Rocco The Taco
Rocco The Taco

Reputation: 3797

Find what script is running in php

The following Apache 2.4 processes seem to consistently be using up the CPU. While I appreciate that it tells me PHP is the command is there a way to see what script is running to eat up this much CPU.

Pid Owner   Priority    CPU %   Memory %    Command
17695 (Trace) (Kill)    seger   0     36.24   0.53  /usr/bin/php
17383 (Trace) (Kill)    seger   0     31.01   0.52  /usr/bin/php
17488 (Trace) (Kill)    seger   0     29.75   0.53  /usr/bin/php
17377 (Trace) (Kill)    seger   0     28.88   0.54  /usr/bin/php
17475 (Trace) (Kill)    seger   0     26.34   0.52  /usr/bin/php
17692 (Trace) (Kill)    seger   0     25.88 0.36    /usr/bin/php
18770 (Trace) (Kill)    seger   0     16.64   0.51  /usr/bin/php
1023 (Trace) (Kill) mysql   0     15.94   1.65

Upvotes: 2

Views: 376

Answers (1)

Abhishek Gurjar
Abhishek Gurjar

Reputation: 7476

If i am not wrong you are asking for this

ps ax | grep *.php

pstree | grep php
ps aux | grep php
ps xuww | grep php

it will list all running php process.

Upvotes: 1

Related Questions