Bug 194437

Summary: vmstat gives invalid idle cpu data.
Product: Red Hat Enterprise Linux 3 Reporter: Allan Jacobsen <aja>
Component: procpsAssignee: Karel Zak <kzak>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-18 15:21:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 190430    

Description Allan Jacobsen 2006-06-08 06:31:14 UTC
Description of problem:  
vmstat gives invalid data for idle cpu.  
  
  
Version-Release number of selected component (if applicable):  
procps-2.0.17-13.7  
  
How reproducible:  
just run it.  
  
Additional info:  
I have a notion that this might be related to the fact that the server has  
been running for 559 days now so the values in /proc/stat that vmstat uses  
have become larger than 32 bits.  
This is a problem for us, as nagios starting giving alerts because of the 0 in 
idle cpu. The alerts started about 1 week ago. 
An upgrade to the latest version of procps did not help. 
We also have munin running on the same server, and it works OK with cpu loads. 
 
Here is the output of /proc/stat:  
#cat /proc/stat  
cpu  361122015 9493 117779454 4345053198 7367033 2792545 4092073  
cpu0 361122015 9493 117779454 4345053198 7367033 2792545 4092073  
intr 4726461882 1137517882 1085 0 0 0 0 0 0 0 0 563659663 3025282925 326 0 1 0  
ctxt 13140683776  
btime 1101370711  
processes 156740468  
procs_running 1  
procs_blocked 0  
  
and of vmstat:  
# vmstat  
procs                      memory      swap          io     system         cpu  
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa  
 5  0      0 156564 125272 1631688    0    0     2     0    0     0  4  7  0   
2

Comment 1 Karel Zak 2006-06-23 19:43:47 UTC
What do you mean with "upgrade to the latest version"? Which version?

Comment 2 Karel Zak 2006-06-23 21:19:57 UTC
You're right 4345053198 is greater than ULONG_MAX and vmstat reads CPU data by
%lu. Thanks for your report.

Comment 4 RHEL Program Management 2007-01-18 15:21:12 UTC
Product Management has reviewed and declined this request.  You may appeal this
decision by reopening this request.