Re: httpd to get process list

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

 



On Thu, May 27, 2010 at 12:42 PM, James Corteciano
<james@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux