LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   linux top command shows odd value in TIME+ column (https://www.linuxquestions.org/questions/linux-software-2/linux-top-command-shows-odd-value-in-time-column-4175448860/)

wastingtime 02-06-2013 06:30 AM

linux top command shows odd value in TIME+ column
 
I run top and sort by TIME+ column. Notice that the first process' TIME+ has an odd format.
That large value shows up the moment I run this program and never changes. Is this a bug in top.

# top -version
top: procps version 3.2.8

Code:

# top
top - 04:24:14 up 5 days, 58 min, 14 users,  load average: 0.29, 0.25, 0.19
Tasks: 173 total,  1 running, 172 sleeping,  0 stopped,  0 zombie
Cpu(s):  2.8%us,  0.5%sy,  0.0%ni, 96.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  2005524k total,  1837696k used,  167828k free,  212692k buffers
Swap:  4088504k total,        0k used,  4088504k free,  614640k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 6009 user      1  0  2104  788  576 S    0  0.0  71571:54 mbedit           
 3876 root      1  0  134m  48m  25m S    1  2.5  64:48.26 X                 
 2100 user      1  0  192m  54m  24m S    3  2.8  48:06.01 konsole           
 4273 user      1  0  342m  83m  20m S    0  4.3  47:33.05 plasma-desktop   
 4259 user      1  0  332m  78m  11m S    0  4.0  37:13.52 kwin


colucix 02-06-2013 06:39 AM

Maybe the process hangs and since it doesn't use the CPU, the CPU time doesn't change.

wastingtime 02-06-2013 07:16 AM

I'm using it so it definitely not hung. 71571 hours is much more than the machine's uptime of 5 days. And that value shows up as soon as the process starts.

druuna 02-06-2013 07:28 AM

Quote:

Originally Posted by wastingtime (Post 4885472)
I'm using it so it definitely not hung. 71571 hours is much more than the machine's uptime of 5 days. And that value shows up as soon as the process starts.

That should be 71571 minutes!
64:48.26 -> 64 minutes, 48 seconds and 26 hundredths of a second.

colucix 02-06-2013 09:45 AM

Quote:

Originally Posted by wastingtime (Post 4885472)
I'm using it so it definitely not hung. 71571 hours is much more than the machine's uptime of 5 days. And that value shows up as soon as the process starts.

Not hung (I used the wrong word) but even if in a sleeping or waiting status, the point is that it doesn't use the CPU so the TIME count is not increased. The TIME column shows the CPU time, not the elapsed time.

wastingtime 02-06-2013 01:52 PM

You right 71571 minutes, which is over 49 days, and uptime is less than 6 days. So my point is even if the process had run at 100% cpu since up, this number would still have to be much smaller.


All times are GMT -5. The time now is 01:10 PM.