LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2009, 05:24 AM   #1
mcguire
LQ Newbie
 
Registered: May 2009
Location: Paris, France
Distribution: Gentoo
Posts: 3

Rep: Reputation: 0
Question 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
 
Old 10-22-2009, 10:38 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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

Last edited by ilikejam; 10-22-2009 at 10:47 AM.
 
Old 10-22-2009, 02:08 PM   #3
mcguire
LQ Newbie
 
Registered: May 2009
Location: Paris, France
Distribution: Gentoo
Posts: 3

Original Poster
Rep: Reputation: 0
OK, that's what I has guessing but not really sure. That's the only logical explanation I think.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Idle Time in KDE elconde Linux - Software 3 11-18-2015 02:21 PM
Find X idle time jlinkels Linux - Software 4 08-16-2013 04:19 PM
Idle time vs program time kinkle Linux - General 4 03-11-2009 10:57 PM
finding login time and idle time,..etc from a list of users knavramesh Linux - Newbie 2 10-02-2008 11:55 PM
IDLE time for DSL metallica1973 Linux - Networking 0 02-22-2005 12:06 PM


All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration