httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilesh Govindarajan <li...@itech7.com>
Subject Re: [users@httpd] httpd to get process list
Date Thu, 27 May 2010 07:47:41 GMT
On Thu, May 27, 2010 at 12:42 PM, James Corteciano
<james@linux-source.org> wrote:
> Hi All,
> I have a nagios server to monitor the remote apache server and automatically
> restarting the service if it is detected unreachable. Now, in times of
> apache down, I just want to get the processes list or any means that could
> help during diagnostic operation. Can anyone recommend any good apps or
> maybe script for this type of scenario?
> Thank you.
> Regards,
> James
>
>


You could use a script which runs every minute or so to check if
apache is dead and dump the processlist at that instant into a file.
Though it may have a lot of performance overhead. You've been warned.
The script:

#!/bin/bash

ps -C httpd &> /dev/null
if [ $? -ne 0 ]; then
  ps -A > /processlit
fi

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message