Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
01-15-2010, 01:51 AM #1
- Join Date
- Jun 2007
- Los Angeles
- Thanked 5 Times in 5 Posts
How can I see what php scripts are running?
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.
Business Text Messaging Services
01-15-2010, 01:58 AM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,660 Times in 2,629 Posts
Whew, been awhile myself:
Try that on the command line, it should give you any processes using the php executable.Code:ps -a | grep php
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.
header('HTTP/1.1 420 Enhance Your Calm');
Users who have thanked Fou-Lu for this post: