Page 1 of 1

grep for 'php' in processes

Posted: Thu Oct 11, 2007 12:20 pm
by cybercog
How would I use grep to look for all of the active php processes?

ps -ax ... <?>

Thanks,

- Don

Posted: Thu Oct 11, 2007 12:29 pm
by DaveTheAve
I don't know the binary for your php or if ps outputs the script instead; however, this might work:

Code: Select all

ps -A | grep php
might want to try this if your run php5 and the above don't work:

Code: Select all

ps -A | grep php5

if nether work try a normal ps-A and see if you can find how it outputs your php binary.

Posted: Thu Oct 11, 2007 12:59 pm
by VladSun

Code: Select all

pgrep php