Bug 109799 - kernel disk stats in /proc/stat are not kept for all block devices
Summary: kernel disk stats in /proc/stat are not kept for all block devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: sysstat
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Charlie Bennett
QA Contact: Brian Brock
URL:
Whiteboard:
: 110092 (view as bug list)
Depends On:
Blocks: 116727
TreeView+ depends on / blocked
 
Reported: 2003-11-11 22:09 UTC by Neil Horman
Modified: 2007-11-30 22:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-02 03:30:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to raise the DK_MAX_MAJOR value (442 bytes, patch)
2003-11-11 22:13 UTC, 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 18:11 UTC, Neil Horman
no flags Details | Diff
fix to my previous systat patch (3.43 KB, patch)
2004-06-01 20:49 UTC, Neil Horman
no flags Details | Diff
removing extra debug code from my last patch (3.43 KB, patch)
2004-06-02 12:10 UTC, 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 16:10 UTC, Johnray Fuller
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:336 0 normal SHIPPED_LIVE Updated sysstat package 2004-09-01 04:00:00 UTC

Description Neil Horman 2003-11-11 22:09:16 UTC
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 22:13:08 UTC
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 07:54:16 UTC
the highest allocated block major is 114 (ataraid) not 201.....

Comment 3 Neil Horman 2003-11-12 12:49:13 UTC
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 16:24:48 UTC
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 16:58:14 UTC
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 13:26:34 UTC
*** Bug 111294 has been marked as a duplicate of this bug. ***

Comment 23 Neil Horman 2004-03-04 18:11:18 UTC
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 15:20:25 UTC
*** Bug 110092 has been marked as a duplicate of this bug. ***

Comment 35 Neil Horman 2004-06-01 20:49:35 UTC
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 12:10:44 UTC
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 21:05:03 UTC
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 21:06:25 UTC
Someone says this should be owned by ccb, so reassigning.

Comment 39 Johnray Fuller 2004-06-09 16:10:04 UTC
Created attachment 100993 [details]
Final version of Neil's patch (Adds back iostat prtion of the fix)...

Comment 43 Jay Turner 2004-08-17 13:18:03 UTC
Bouncing this back to assigned, as appears that Jay has discovered an
oddity.

Comment 44 Neil Horman 2004-08-17 13:38:37 UTC
he's right, that should be wio, not rsect.  I'll regenerate the patch.

Comment 49 Neil Horman 2004-08-23 19:52:36 UTC

*** This bug has been marked as a duplicate of 123136 ***

Comment 50 Jay Turner 2004-09-02 03:30:49 UTC
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.