[mrtg] MRTG: 2.9.27b1 --pif-file option broken

Colin Horsington chorsington at flow.com.au
Fri Jan 31 02:05:15 MET 2003

Hi all,

Having had a play around with 2.9.27b1 the --pid-file option works fine in
cron mode and daemon mode when there is only one fork.  However as soon as
you have multiple forks only the parent process is recorded in the pid file.

For example output for ps is...

#(xxxx)-(1)-(xxxx) -=> ps ax | grep mrtg
 5364 ?        S      0:00 /usr/bin/perl -w /usr/bin/mrtg /etc/mrtg.cfg
--pid-file /var/run/mrtg.pid
 5455 ?        S      0:00 /usr/bin/perl -w /usr/bin/mrtg /etc/mrtg.cfg

And if you try and make a nice init script then it's difficult to kill the
other forks.  I think we have a couple of options:

1.  Put all the pids into the pid file
2.  Make the forks threads and then if the parent is killed so do the

Of course there maybe many other ways of solving this problem :)

Ps.  I am still seeing:
	SNMPopen Unknown SNMP Option Key 'avoid_negative_request_ids'
	at /usr/bin/mrtg line 1635



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