What units of time does "top" use?

  • 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 ...
  • 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.

    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 Yes, 89122:13 = 5347333 seconds ≈ 62 days.

    @Abe I guess that we can divide that given time for the number of cores and get the clock time since it started...

    @Gilles I'm new to Linux. Which time does TIME+ signify? For how much time the job is running?

    @mithusengupta123 That's the amount of CPU time used by the process. It may be a lot less than how long the process has been running if the process isn't CPU-bound, for example a process that spends most of its time idle waiting to serve requests.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM

Tags used