Bug 109799 - kernel disk stats in /proc/stat are not kept for all block devices
kernel disk stats in /proc/stat are not kept for all block devices
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: sysstat (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Charlie Bennett
Brian Brock
:
: 110092 (view as bug list)
Depends On:
Blocks: 116727
  Show dependency treegraph
 
Reported: 2003-11-11 17:09 EST by Neil Horman
Modified: 2007-11-30 17:06 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-01 23:30:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to raise the DK_MAX_MAJOR value (442 bytes, patch)
2003-11-11 17:13 EST, Neil Horman
no flags Details | Diff
patch to allow sadc/sar and iostat to read info from /proc/partitions rather than /proc/stat (5.62 KB, patch)
2004-03-04 13:11 EST, Neil Horman
no flags Details | Diff
fix to my previous systat patch (3.43 KB, patch)
2004-06-01 16:49 EDT, Neil Horman
no flags Details | Diff
removing extra debug code from my last patch (3.43 KB, patch)
2004-06-02 08:10 EDT, Neil Horman
no flags Details | Diff
Final version of Neil's patch (Adds back iostat prtion of the fix)... (7.24 KB, text/plain)
2004-06-09 12:10 EDT, Johnray Fuller
no flags Details

  None (edit)
Description Neil Horman 2003-11-11 17:09:16 EST
Description of problem:
The DK_MAX_MAJOR definition is too low in kernel_stat.h, and does not
encompass all the block devices in documentation/devices.txt

Version-Release number of selected component (if applicable):
All

How reproducible:
allways

Steps to Reproduce:
1.boot a system using a block device with a major number greater than
the kernels DK_MAJOR_MAX value (cciss is a good example)
2. preform io to the device through a filesystem
3. examine /proc/stat, or the output of sar or iostat on the device
  
Actual results:
no activity is recorded

Expected results:
proper disk usage statistics are kept

Additional info:
DK_MAX_MAJOR should be raised to match the greatest block major value
in Documentation/devices.txt
Comment 1 Neil Horman 2003-11-11 17:13:08 EST
Created attachment 95915 [details]
patch to raise the DK_MAX_MAJOR value

This is really kind of a silly solution, as its pretty wasetful on memory, but
it should work.  Perhaps what is really needed is a patch so that the dk_disk*
arrays in kstat_percpu can grow when block device modules with major numbers
greater than DK_MAX_MAJOR can grow the size of the array dynamically
Comment 2 Arjan van de Ven 2003-11-12 02:54:16 EST
the highest allocated block major is 114 (ataraid) not 201.....
Comment 3 Neil Horman 2003-11-12 07:49:13 EST
Documentation/devices.txt lists block major 201 (the Veritas VxVM
dynamic multipathing driver) as the highest allocated block number
Comment 4 Stephen Tweedie 2003-11-13 11:24:48 EST
The stats in /proc/partitions should be available for devices with any
major number, regardless of what is in /proc/stats.  User-space should
be looking there for its information.
Comment 5 Neil Horman 2003-11-13 11:58:14 EST
Looking at the two files, I don't see a direct way to convert between
the stats which /proc/partitions gathers and those which /proc/stats
gathers. I'll happily start patching sar, iostat, etc to start using
proc/partitions if I can figure out a conversion map between the two
files.
Comment 9 Nils Philippsen 2004-02-26 08:26:34 EST
*** Bug 111294 has been marked as a duplicate of this bug. ***
Comment 23 Neil Horman 2004-03-04 13:11:18 EST
Created attachment 98301 [details]
patch to allow sadc/sar and iostat to read info from /proc/partitions rather than /proc/stat

This is an alternative patch to patch 95915.  This patch, instead of raising
the DK_MAX_MAJOR value in the kernel, alters iostat and sadc to collect disk io
data from /proc/partitions rather than a combination of /proc/partitions and
/proc/stat.
Comment 29 Neil Horman 2004-05-05 11:20:25 EDT
*** Bug 110092 has been marked as a duplicate of this bug. ***
Comment 35 Neil Horman 2004-06-01 16:49:35 EDT
Created attachment 100766 [details]
fix to my previous systat patch

local array I was using for line input wasn't long enough for some lines in
/proc/partitions.  This modified patch fixes that and cleans a few other things
up
Comment 36 Neil Horman 2004-06-02 08:10:44 EDT
Created attachment 100790 [details]
removing extra debug code from my last patch

sorry, had some extraneous debug code in my last patch
Comment 37 Tim Burke 2004-06-02 17:05:03 EDT
Seems we all agree its not a kernel problem.  So.....

- changing owner to bernds
- changing category from kernel to OS
Comment 38 Tim Burke 2004-06-02 17:06:25 EDT
Someone says this should be owned by ccb, so reassigning.
Comment 39 Johnray Fuller 2004-06-09 12:10:04 EDT
Created attachment 100993 [details]
Final version of Neil's patch (Adds back iostat prtion of the fix)...
Comment 43 Jay Turner 2004-08-17 09:18:03 EDT
Bouncing this back to assigned, as appears that Jay has discovered an
oddity.
Comment 44 Neil Horman 2004-08-17 09:38:37 EDT
he's right, that should be wio, not rsect.  I'll regenerate the patch.
Comment 49 Neil Horman 2004-08-23 15:52:36 EDT

*** This bug has been marked as a duplicate of 123136 ***
Comment 50 Jay Turner 2004-09-01 23:30:49 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-336.html

Note You need to log in before you can comment on or make changes to this bug.