Andrei Cristian Niculae wrote:
> Hi,
> Scott Lawrence wrote:
>> On Thu, 2008-06-12 at 18:46 +0300, Andrei Cristian Niculae wrote:
>>   
>>> 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?
>>>     
>>
>> I can't comment on how mrtg should be set up to make it work, but the
>> requirement is pretty simple - the pid file needs to exist, and contain
>> just the integer pid of the managed process.
>>   
> 
> I've just made a simple test which tries to emulate what mrtg does, and 
> I get the same result (the test is attached to the email).
> What it does: it is lunched with --daemon --pid_file PIDFILE --lock_file 
> LOCKFILE, checks if the LOCKFILE exists (if it does, it exits), then 
> execs itself with --pid_file PIDFILE --lock_file LOCKFILE after 5 
> seconds, writes its pid in the pid file, after which it enters a while(1).
> The pid file exists, it contains just the pid of the running process.
> The problem is that the start is delayed a bit (I overreacted in the 
> test program with 5 seconds), and only then the pid files appear.
> But even if ./sipxpbx status states that all processes are o.k., 
> sipxsupervisor sends mail that it's not o.k. and in the log it appears 
> that it changes the status of the process from running to failed.
> Even more, when doing ./sipxpbx stop, the lunched process is stopped.
> 
> I haven't tried the xml rpc interface but I have a feeling it won't work.
> 
> But how can I avoid the emails sent by sipxsupervisor? And I doing 
> something wrong?
> 
> Andrei
> 

Did you see a thread on new process descriptor format.

http://permalink.gmane.org/gmane.comp.voip.sipx.devel/10607

I do not think it requires PID files any more as long as you can start and stop 
your service in other way.
D.

_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to