[mrtg] Re: Daemons and Forks

Brian E. Seppanen seppy at chartermi.net
Thu Feb 22 17:31:43 MET 2001



> > One problem I've run into is that when this script restarts mrtg from cron
> > it doesn't fork properly.  Even though my config specifies four forks, I
> > end up with four mrtg processes and no children forking off one parent.
>
> I think you'll find that MRTG doesn't fork if you run it from cron.  The
> fork command only works if "RunAsDaemon: Yes" is in your config script.
>
> What I find is that the child processes seem to die if they aren't required.

I have RunAsDaemon: Yes.  the cron script calls /etc/rc.d/init.d/mrtg
start.  with the start sequence being
su - mrtg -c "/usr/bin/nohup /usr/local/mrtg/bin/mrtg /home/mrtg/main.conf"

I realize there are no children if they aren't required, however, seeing
four parent processes is definately indicative of a problem with it
forking.

I'll have to try 2.9.10 and see if that works.  No luck with 2.9.5,6,7
though in other aspects.

Thanks,

Brian Seppanen
Charter Communications
Regional Data Center				906-228-4226 ext 23
Marquette, MI					seppy at chartermi.net


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list