Portal Home > Knowledgebase > Articles Database > How can I kill all the PHP processes belonging to a specific user?
How can I kill all the PHP processes belonging to a specific user?
Posted by robotwink, 10-11-2009, 12:23 AM |
Hello,
How can I kill all the PHP processes belonging to a specific user?
1) When I use: killall -9 php it kills all PHP processes, how can I kill the PHP processes belonging to the user "john" only?
2) How can I kill all the processes belonging to the user "john" whether it is PHP or anything else?
Your help would be greatly appreciated.
|
Posted by CArmstrong, 10-11-2009, 12:29 AM |
Try adding -u username
" -u, --user
Kill only processes the specified user owns. Command names are
optional.
"
http://unixhelp.ed.ac.uk/CGI/man-cgi?killall+1
|
Posted by robotwink, 10-11-2009, 01:13 AM |
Thanks but this is not working:
|
Posted by TheITAdvisory, 10-11-2009, 01:42 AM |
What is the problem? Is there an error when you try that command?
|
Posted by robotwink, 10-11-2009, 01:51 AM |
No, but it's not being killed.
|
Posted by TheITAdvisory, 10-11-2009, 01:53 AM |
Perhaps something is restarting it. Why is php running under a user anyways?
|
Posted by root24x7, 10-11-2009, 02:14 PM |
Try the below command
|
Add to Favourites Print this Article
Also Read