Damian Krzeminski wrote:
Andrei Cristian Niculae wrote:
p.s. there's something else that's strange. After mrtg starts running,
it appears that two processes are starting up:
[EMAIL PROTECTED] git-installed-sipx]$ cat ./var/run/sipxpbx/sipx-mrtg.pid
cat: ./var/run/sipxpbx/sipx-mrtg.pid: No such file or directory
[...]
Not sure if I can help much here, but it looks like all this problems are
related to the fact that pid file either does contain the mrtg pid. Specifically
does not contain the pid that can be used to stop MRTG or verify if it's running.
One thing that I noticed is that you start MRTG like that:
MRTG_BIN --user $SIPXPBXUSER --group $SIPXPBXGROUP $MRTG_CONFIG_FILE --lock-file
$MRTG_CONFIG_FILE.l --confcache-file $MRTG_CONFIG_FILE.ok --pid-file $MRTG_PID_FILE
but mrtg manual page suggests that --pid-file option is only relevant if MRTG
runs in a daemon mode (--daemon).
D.
My mrtg actually runs in daemon mode, but it sees that it should run as
daemon when reading the mrtg.cfg file (it has a switch RunAsDaemon:Yes).
But thanks for enlightening me. You're right, that's the reason why I
see two mrtg processes at startup, and why the pid file is not created
until the second one is ran.
So this is probably what's happening: mrtg starts, he sees that he
should run as daemon so he daemonizez himself, by exec I think, so he
gets a new pid.
I've just tried passing --daemon switch and commented the RunAsDaemon
from the cfg, and I get the same result.
But why does sipxpbx status report mrtg as OK, even if sipXsupervisor
sends mail that it's not O.K., and is actually FAILED?
If I write the pid of the first instance of the mrtg in the pid file,
than I get
Checking sipx-mrtg: [FAILED]
which I suppose it's normal, since the pid will not exist eventually.
Does sipXsupervisor have a problem with programs that execs themselves
and than quit, to run as daemon?
I see that sipxcallresolver has a parameter --daemon when invoked so I'm
guessing that NO.
Anyone can explain what's happening?
Regards,
Andrei
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev