grep for 'php' in processes

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
cybercog
Forum Newbie
Posts: 20
Joined: Sat Oct 06, 2007 10:35 pm

grep for 'php' in processes

Post by cybercog »

How would I use grep to look for all of the active php processes?

ps -ax ... <?>

Thanks,

- Don
User avatar
DaveTheAve
Forum Contributor
Posts: 385
Joined: Tue Oct 03, 2006 2:25 pm
Location: 127.0.0.1
Contact:

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

Code: Select all

pgrep php
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply