Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can i get the result like example following. Any command or scripts?

Snapshot
u1234 3971 1.9 0.0 0 0 ? Z 20:00 0:00 [php] <defunct>
u1234 4243 3.8 0.2 64128 43064 ? D 20:00 0:00 /usr/bin/php /home/u1234/public_html/index.php
u1234 4289 5.3 0.2 64128 43064 ? R 20:00 0:00 /usr/bin/php /home/u1234/public_html/index.php
u1234 4312 9.8 0.2 64348 43124 ? D 20:01 0:00 /usr/bin/php /home/u1234/public_html/index.php
u1235 4368 0.0 0.0 30416 6604 ? R 20:01 0:00 /usr/bin/php /home/u1235/public_html/index.php
u1236 4350 2.0 0.0 34884 13284 ? D 20:01 0:00 /usr/bin/php /home/u1236/public_html/index.php
u1237 4353 13.3 0.1 51296 30496 ? S 20:01 0:00 /usr/bin/php /home/u1237/public_html/index.php
u1238 4362 63.0 0.0 0 0 ? Z 20:01 0:00 [php] <defunct>
u1238 4366 0.0 0.1 51352 30532 ? R 20:01 0:00 /usr/bin/php /home/u1238/public_html/index.php
u1239 4082 3.0 0.0 0 0 ? Z 20:00 0:01 [php] <defunct>
u1239 4361 26.0 0.1 49104 28408 ? R 20:01 0:00 /usr/bin/php /home/u1239/public_html/index.php
u1240 1980 0.4 0.0 0 0 ? Z 19:58 0:00 [php] <defunct>
CPU TIME = 8459.71999999992 

This result i got from hostgator support :)

I was used "top -c" but they do not show "/home/u1239/public_html/index.php Thanks

share|improve this question
    
I'd guess it's an output from ps, though I can't say which of its countless options were used. –  AndreKR Nov 23 '11 at 1:56
    
That output also assumes you're server is using CGI (I.E. each script is it's own process), if you're using mod_php top will probably just show the usage for the httpd processes –  sam Nov 23 '11 at 9:44
add comment

migrated from stackoverflow.com Nov 23 '11 at 9:38

This question came from our site for professional and enthusiast programmers.

1 Answer

I guess it could be the output of something like this:

# ps -eo user,pid,pcpu,pmem,vsize,size,tty,state,etime,cputime,command | grep [p]hp
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.