6

I just ran the top command to observe the following process

chown -r me:me allMyMusic

And it's been running for about 5 minutes, however the TIME+ column in the top command has reported it as running for about 0:12.10 seconds. It's also incrementing quite slowly.

Has anyone experienced the TIME+ column of the top command incorrectly report the time elapsed?

3 Answers 3

11

The column displays CPU time spent per process rather than real time. I can't see if this is specified in the man page but here is some copy-pastage from about.com:

"TIME Total CPU time the task has used since it started. If cumulative mode is on, this also includes the CPU time used by the process's children which have died. You can set cumulative mode with the S command line option or toggle it with the interactive command S. The header line will then be changed to CTIME. "

1
  • Ah, i'm on Mac hence my man page was different. As Khaled posted, the man page on Linux describes this as above.
    – Breadbin
    Jan 10, 2012 at 10:12
1

The manual describes the TIME column as:

TIME

Total CPU time the task has used since it started. If cumulative mode is on, this also includes the CPU time used by the process's children which have died. You can set cumulative mode with the S command line option or toggle it with the interactive command S. The header line will then be changed to CTIME.

1
  • Nope Cumulative ON or OFF, it is still incorrect, and TIME does never changes to CTIME.
    – user343432
    Mar 13, 2016 at 17:46
1

to see the Time that a process has taken so far use (as root)

    ps aux |grep (processName) 

at least on linux should be similar on Mac, but this will show you the start time and the following grep process will give you the current time although you could run 'date' command

1
  • Showing the process start time is not quite as good as showing the elapsed wallclock time, but it might be the best you'll get. Sep 3, 2014 at 23:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .