LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   idle time greater than uptime (https://www.linuxquestions.org/questions/linux-newbie-8/idle-time-greater-than-uptime-763659/)

mcguire 10-22-2009 04:24 AM

idle time greater than uptime
 
Hi,

I'm trying to do some system status report. In this report, I show uptime and idle time that can be acquired with a simple cat /proc/uptime.

The man proc page says :
Quote:

This file contains two numbers: the uptime of the system (seconds), and the amount of time spent in idle process (seconds).
On my linux box, I have :
Code:

chaton ~ $ cat /proc/uptime
340349.02 967446.05

Which means 340349 seconds uptime and 967446 seconds idle time.
I think that idle time should be less or equal to uptime but not greater. Am I wrong ?

Can this measure be distorted due to a multi-core SMP system or use of frequency scaling ?

Here is some additional informations :
Code:

chaton ~ $ uname -a       
Linux chaton 2.6.31-gentoo-r2 #1 SMP PREEMPT Sun Oct 11 16:36:20 CEST 2009 x86_64 AMD Phenom(tm) 9350e Quad-Core Processor AuthenticAMD GNU/Linux

chaton ~ $ cat /proc/cpuinfo                                                                                                                   
processor      : 0                                                                                                                             
vendor_id      : AuthenticAMD                                                                                                                 
cpu family      : 16                                                                                                                           
model          : 2                                                                                                                             
model name      : AMD Phenom(tm) 9350e Quad-Core Processor                                                                                     
stepping        : 3                                                                                                                             
cpu MHz        : 1000.000                                                                                                                     
cache size      : 512 KB                                                                                                                       
physical id    : 0                                                                                                                             
siblings        : 4                                                                                                                             
core id        : 0                                                                                                                             
cpu cores      : 4                                                                                                                             
apicid          : 0                                                                                                                             
initial apicid  : 0                                                                                                                             
fpu            : yes                                                                                                                           
fpu_exception  : yes                                                                                                                           
cpuid level    : 5                                                                                                                             
wp              : yes                                                                                                                           
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips        : 3999.24                                                                                                                                                                                                                   
TLB size        : 1024 4K pages                                                                                                                                                                                                             
clflush size    : 64                                                                                                                                                                                                                       
cache_alignment : 64                                                                                                                                                                                                                       
address sizes  : 48 bits physical, 48 bits virtual                                                                                                                                                                                         
power management: ts ttp tm stc 100mhzsteps hwpstate                                                                                                                                                                                       

processor      : 1
vendor_id      : AuthenticAMD
cpu family      : 16         
model          : 2         
model name      : AMD Phenom(tm) 9350e Quad-Core Processor
stepping        : 3                                     
cpu MHz        : 1000.000                               
cache size      : 512 KB                                 
physical id    : 0                                     
siblings        : 4                                     
core id        : 1                                     
cpu cores      : 4                                     
apicid          : 1                                     
initial apicid  : 1                                     
fpu            : yes                                   
fpu_exception  : yes                                   
cpuid level    : 5                                     
wp              : yes                                   
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips        : 4000.03                                                                                                                                                                                                                   
TLB size        : 1024 4K pages                                                                                                                                                                                                             
clflush size    : 64                                                                                                                                                                                                                       
cache_alignment : 64                                                                                                                                                                                                                       
address sizes  : 48 bits physical, 48 bits virtual                                                                                                                                                                                         
power management: ts ttp tm stc 100mhzsteps hwpstate                                                                                                                                                                                       

processor      : 2
vendor_id      : AuthenticAMD
cpu family      : 16         
model          : 2         
model name      : AMD Phenom(tm) 9350e Quad-Core Processor
stepping        : 3                                     
cpu MHz        : 1000.000                               
cache size      : 512 KB                                 
physical id    : 0                                     
siblings        : 4                                     
core id        : 2                                     
cpu cores      : 4                                     
apicid          : 2                                     
initial apicid  : 2                                     
fpu            : yes                                   
fpu_exception  : yes                                   
cpuid level    : 5                                     
wp              : yes                                   
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips        : 4000.04                                                                                                                                                                                                                   
TLB size        : 1024 4K pages                                                                                                                                                                                                             
clflush size    : 64                                                                                                                                                                                                                       
cache_alignment : 64                                                                                                                                                                                                                       
address sizes  : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor      : 3
vendor_id      : AuthenticAMD
cpu family      : 16
model          : 2
model name      : AMD Phenom(tm) 9350e Quad-Core Processor
stepping        : 3
cpu MHz        : 1000.000
cache size      : 512 KB
physical id    : 0
siblings        : 4
core id        : 3
cpu cores      : 4
apicid          : 3
initial apicid  : 3
fpu            : yes
fpu_exception  : yes
cpuid level    : 5
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips        : 4000.03
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes  : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate


ilikejam 10-22-2009 09:38 AM

Hi.

uptime is measured in 'wall time', i.e. the number of seconds that have elapsed since the machine was booted.
The idle time is the time each processor has spent idle, so it'll be around 4 times higher than you would expect in your case.

Edit: Or at leas that's what I thought. My 2 core, very quiet server's reporting uptime just higher than idle time, while my also very quiet dual core desktop's idle time isn't moving at all. Weird.

Dave

mcguire 10-22-2009 01:08 PM

OK, that's what I has guessing but not really sure. That's the only logical explanation I think.


All times are GMT -5. The time now is 07:33 PM.