01-15-2010, 02:51 AM
I have a bunch of php cron scripts that run every hour on my linux server. Sometimes one of them hangs up and consumes a lot of resources. How can I check to see if I have any php scripts running? If I can see the script name I'll know if it should be running still or not.
01-15-2010, 02:58 AM
Whew, been awhile myself:
ps -a | grep php
Try that on the command line, it should give you any processes using the php executable.
Follow it up with the kill command to delete the hanging resource. This shouldn't be a problem though, unless PHP is ignoring user abort and set to no timelimit, it should complete by itself. Unless its got some runtime errors giving it problems like infinite redirects to self or looping.