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

2 Answers 2

up vote 4 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
1  
@Abe I guess that we can divide that given time for the number of cores and get the clock time since it started... –  PJunior Apr 23 at 21:29

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
    
Well it leads 'anyone' in mistake, in my opinion. –  PJunior Apr 23 at 21:28
    
Your answer is useful, but stating the 'other answer is totally wrong', is (in my opinion) not accurate. The original question is what units are used. The 'other answer' answers that. It just doesn't specify that this is a measurement of CPU time, not clock time. Your answer clarifies that and so it is useful (but doesn't answer the original question). I will vote your answer up if you remove from your answer that the other answer is 'totally wrong'. –  Jason S May 8 at 1:51

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.