Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- script to kill long processes not working


starchild - 3:34 am on Oct 30, 2012 (gmt 0)


We have the problem of a few php files that occaisionally just wont die , for whatever reason.

We have tried everything to isolate the issue, but with no success.

We came across the following perl script which we are running as a cron, but sometimes it still doesn't kill the pid's.



ps -lef | grep "nobody" | grep httpd | perl -ane '($h,$m,$s) = split /:/,$F[13]; kill + 9, $F[3] if ($m > 2);'




Our server runs on centos 5.7 "nobody" is how we define apache process users.

Bascially, the script should be killing anything that is > 2 minutes old.

Help please?


Thread source:: http://www.webmasterworld.com/linux/4513804.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com