I have used both uptime
and cat /proc/uptime
commands. I know the idle time in the later can be greater than running time (multiprocessors). However, when I add both running and idle times, and compare it to the uptime
(5:30 hrs) they are not equal. I assume it's because the uptime
returns the real time and the cat /proc/uptime
returns processor(s) time.
Short things clear, I want to know the reason exactly and I want to know which one to choose, according to the topic.
Also, is it possible to get the processor(s) time in the last 24 hours?
NOTE: Please read this article to understand where this is going.
*Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise *
/proc/uptime
is the uptime in wall time. Meaning it's real time, not CPU time. If that doesn't match the value ofuptime
, then you've got some voodoo going on. Can you provide the output of each for us to look at?uptime
: 21:24 ..cat \proc\uptime
: 77098.74 103113.16. They are slightly different though..