LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ps ax with execution time? (https://www.linuxquestions.org/questions/linux-software-2/ps-ax-with-execution-time-844262/)

vaporizel 11-14-2010 08:31 PM

ps ax with execution time?
 
hello,i know using
Code:

ps ax | grep php
i can retrieve processing with string "php", but how i can see its execution time, how long that php script running? (like app blahblah executed for 5 minutes)

AlucardZero 11-14-2010 09:09 PM

What you want is in the Time column, right?

vaporizel 11-14-2010 09:45 PM

ah thanx for your reply, i found it now

Code:

ps axo pid,etime,args
etime format = elapsed time

Code:

  PID    ELAPSED COMMAND
    1    01:53:06 init [3]
    2    01:53:06 [migration/0]
    3    01:53:06 [ksoftirqd/0]
    4    01:53:06 [watchdog/0]
    5    01:53:06 [events/0]
    6    01:53:06 [khelper]
    7    01:53:06 [kthread]
  10    01:53:06 [kblockd/0]
  11    01:53:06 [kacpid]
  47    01:53:06 [cqueue/0]
  50    01:53:06 [khubd]
  52    01:53:06 [kseriod]
  114    01:53:05 [pdflush]
  115    01:53:05 [pdflush]
  116    01:53:05 [kswapd0]
  117    01:53:05 [aio/0]
  269    01:53:03 [kpsmoused]
  298    01:53:02 [ata/0]
  299    01:53:02 [ata_aux]
  304    01:53:02 [kstriped]
  313    01:53:02 [ksnapd]
  324    01:52:42 [kjournald]
  350    01:52:16 [kauditd]
  383    01:52:15 /sbin/udevd -d
 1171    01:52:05 [kmpathd/0]
 1172    01:52:05 [kmpath_handlerd]
 1195    01:52:04 [kjournald]
 1745    01:51:53 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
.................
............



All times are GMT -5. The time now is 07:03 AM.