monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with dead processes


From: Martin Pala
Subject: Re: problem with dead processes
Date: Mon, 20 Aug 2012 12:06:23 +0200

Please can you provide the following data?:

1.) output of "cat <path_to_the_pidfile_of_the_process_which_is_not_running>"
2.) output of "ps -ef | grep `cat <path_to_the_pidfile_of_the_process_which_is_not_running>`"
3.) output of: strace -f -o /tmp/monit.strace -p `cat /var/run/monit.pid`   (note: the output will be stored in the /tmp/monit.strace file)


Regards,
Martin



On Aug 20, 2012, at 9:01 AM, Avi Vigder <address@hidden> wrote:

I do check with pid file, but this is not the issue.
We did encounter what you describe, on server startup, and have an init processes to clean the pid files for that.
 
The situation here is that the pid file contains a pid number that does not exist when checking with ‘ps –ef’ but the getpgid returns a positive number on that pid.
 
From: address@hidden [mailto:monit-address@hidden] On Behalf Of Martin Pala
Sent: Sunday, August 19, 2012 11:56 PM
To: This is the general mailing list for monit
Subject: Re: problem with dead processes
 
Hello,
 
what process check type do you use? The pidfile based or pattern based? If pidfile, monit depends on the pidfile content => it is possible that the pidfile contains valid PID, which was assigned to different process after the original one died => monit thinks that the process is running (which in fact is true, as monit is set to watch the given PID and has no other information about how the process should look like). The solution could be to use the pattern based process check.
 
Regards,
Martin
 
 
On Aug 19, 2012, at 5:08 PM, Avi Vigder <address@hidden> wrote:


 
We run monit 5.4 and monitor large number of processes (1K-2K).
 
When I kill all the processes. Most are restarted by monit.
but some are marked as running although the processes is not alive.
 
I’ve notices that monit uses getpgid() to determine if the processes is alive, and it seems that the system call returns a positive value although the pid does not exist (checking with ps –ef).
 
Any ideas?
 
 
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

[Prev in Thread] Current Thread [Next in Thread]