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.

I was testing out the linux api while working on something but got stuck on the following output.

[Abhii@localhost net]$ cat /proc/uptime
39135.53 149657.73

As per specs the first number should be the Uptime and the second number should be the time system has stayed idle.

So why is the former less then latter ???

As an extra piece of info my version information

Linux version 3.5.2-3.fc17.x86_64 (mockbuild@) (gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) ) #1 SMP Tue Aug 21 19:06:52 UTC 2012
share|improve this question

1 Answer 1

up vote 5 down vote accepted

Idle time is the sum of all your CPU/core idle times, while uptime is the wall-clock time your system has been up.

I'm guessing you have four CPUs/cores/threads.

share|improve this answer
    
Wow , thats brilliant & confusing ! –  Abhishek Oct 22 '12 at 6:54

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.