LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   wall clock time of a running process (https://www.linuxquestions.org/questions/linux-general-1/wall-clock-time-of-a-running-process-458449/)

ljmace1953 06-26-2006 11:00 AM

wall clock time of a running process
 
I know with top I see cpu time but I want to know how long(wall clock)a process has been running. What is or is there a command for this??
thanks
Mace

MensaWater 06-26-2006 11:29 AM

In Linux "time <command>" will give you usr, sys and real time for a command. real time being the one you're interested in.

Note: In most UNIX variants it is timex rather than time. (timex <command>)

MensaWater 06-26-2006 11:31 AM

Oops - on reread - you want to know how to get time of an existing process. You can get the time a process was started (see ps man page and look at "T" format option). You would then have to do the math by typing date to get current time and subtract the start time from the current to see how long it has been running.

ljmace1953 06-26-2006 01:14 PM

found it through some googling..but I'm goinf to look up the T parm also
ps -eo pid,user,start --sort pid
thx
Mace


All times are GMT -5. The time now is 06:23 PM.