Posts Tagged ‘processes’

Killing zombie processes

Wednesday, July 25th, 2012 | Life, Tech

Zombie processes are very hard to kill, like cave trolls, but there is a way. We need to get the parent IDs for them and use those.

ps -Al
kill <ppid>

View all PHP scripts currently running

Friday, February 24th, 2012 | Life, Tech

Need to get a list of all the PHP scripts currently running? Actually, this technique works for everything, you just need to change the argument you pass to grep, but for the purpose of this example, I’m going to say we’re looking for PHP scripts.

ps aux | grep php

This will then produce a list of all the scripts. The ps aux command gives us a list of every processing running on the system. We then pass this through to grep and search for what we want – in this case processing which contain “php”.