Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I issue the "top" command and receive results such as:

PID   USER  PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND   
00001 bob   25   0 77380 1212 1200 R 95.8  0.0  89122:13 fee         
00002 bob   25   0 77380 1196 1184 R 95.4  0.0  88954:14 fi         
00003 sam   18   0  427m  16m 6308 R 30.0  0.1  54:46.43 fo         
00004 sam   18   0  427m  16m 6308 R 26.5  0.1  52:55.33 fum         

Question: What are the units in the "TIME+" column?

What I have tried: (please suggest a better strategy for searching documentation ...)

  • man top | grep -C 4 time or
  • man top | grep <X> when I substitute minute, hour, day, or HH for X ...
share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

minutes:seconds.hundredths

Searching for “TIME+” or for “seconds” gives the answer, kind of (I wouldn't call the man page clear).

This format is inherited from BSD, you also get it with ps u or ps l under Linux.

share|improve this answer
    
thanks ... (I found TIME+ from the first search, but was daunted); can I assume that 89122:13 is in units of MM:SS, (89122 minutes and 13 seconds = 60 days)? –  Abe Oct 30 '12 at 0:11
    
@Abe Yes, 89122:13 = 5347333 seconds ≈ 62 days. –  Gilles Oct 30 '12 at 0:19
add comment

The other answer is totally wrong. ps and top display CPU time used, not clock time since the process started. One way to check when the process started is use the following command. The PID file creation date is when the process started:

ls -ld /proc/pid

So for process 2303 it would be:

ls -ld /proc/2303
share|improve this answer
    
I don't see anywhere where Gilles said that the values showed clock time... –  Chris Down Feb 13 '13 at 11:35
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.