Bug 145084 - "iostat -x" can not display partition information.
"iostat -x" can not display partition information.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: sysstat (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Charlie Bennett
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-14 03:40 EST by L3support
Modified: 2007-11-30 17:07 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-01 16:37:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description L3support 2005-01-14 03:40:13 EST
Description of problem:
 "iostat -x" can not display partition information.
 RHELv3 can display it , but RHELv4 can not do it.

Version-Release number of selected component (if applicable):
 sysstat-5.0.5-1

How reproducible:
 always

Steps to Reproduce:
1. iostat -d -x 5 1
2. cat /proc/diskstats
3. compare them
  
Actual results:
===
 # iostat -d -x 5 1
 Linux 2.6.9-1.648_EL (rxi600-2)         01/14/05
 
 Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    
wkB/s avgrq-sz avgqu-sz   await  svctm %util
 sda          0.63   7.29  1.32  5.71   83.62  104.06    41.81    
52.03    26.70     0.10   14.53   8.51  5.98
 sdb          2.67   6.55  0.11  0.37    3.22   49.51     1.61    
24.76   110.09     0.04   82.90   2.79  0.13

 # cat /proc/diskstats
 (snip)
   8    0 sda 6504 2504 367607 54002 25021 57369 577186 4362094 0 
236528 4416149
   8    1 sda1 412 629 11818 11818
   8    2 sda2 8579 366626 70671 565368
   8   16 sdb 422 9908 11952 1854 1363 24312 183966 145692 0 5033 
147547
   8   17 sdb1 10120 10584 25675 183966
   8   18 sdb2 21 672 0 0
   8   19 sdb3 167 344 0 0
===

Expected results:
 same as RHELv3
===
 # iostat -d -x 5 1
 Linux 2.4.21-20.ELsmp (p200-1)  01/14/05
 
 Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    
wkB/s avgrq-sz avgqu-sz   await  svctm  %util
 sda          1.52   0.42  0.20  0.18   13.74    4.84     6.87     
2.42    49.30     0.02   54.37   5.65   0.21
 sda1         0.00   0.00  0.00  0.00    0.01    0.00     0.00     
0.00    45.93     0.00   52.60  32.66   0.00
 sda2         0.00   0.06  0.03  0.01    0.26    0.56     0.13     
0.28    18.55     0.01  157.13   2.77   0.01
 sda3         1.45   0.09  0.10  0.01   12.40    0.78     6.20     
0.39   127.82     0.00   22.63  10.58   0.11
 sdb         18.59   4.76  0.81  0.11  155.22   38.99    77.61    
19.49   212.61     0.00   60.83   3.05   0.28
 sdb1        18.59   4.76  0.81  0.11  155.22   38.99    77.61    
19.49   212.62     0.00   60.84   3.05   0.28

# cat /proc/partitions
 major minor  #blocks  name     rio rmerge rsect ruse wio wmerge 
wsect wuse running use aveq
 
    8     0   71687370 sda 157618 1212292 10925368 1138740 142113 
337597 3849120 15156460 0 1694920 16785680
    8     1     265041 sda1 104 3753 7714 470 69 47 232 8630 0 5650 
9100
    8     2   10482412 sda2 26023 121 208474 69300 9344 46359 447592 
5487830 0 98110 5573820
    8     3   10482412 sda3 76934 1155982 9862650 832160 5083 72435 
621144 1024230 0 867550 1857480
    8    16   71687370 sdb 642033 14786962 123430666 1945030 84319 
3788884 31002568 42241580 0 2214270 1253687
    8    17   71681998 sdb1 642015 14786908 123430522 1945110 84319 
3788884 31002568 42241580 0 2214340 1253777
===

Additional info:
 It is deterioration not to display the I/O performance of the 
partition. 
 There are important influences in the customer and middleware that 
wants to 
 learn the state and the performance of I/O. 
 I strongly hope for the correction of this problem.
Comment 2 JoAnne K. Halligan 2005-01-17 11:23:04 EST
Adding Fujitsu on site engineers in Westford to cc. 
Comment 3 RHEL4-L3support 2005-01-18 21:15:36 EST
Add RHEL4-L3support team in Japan
Comment 4 Florian La Roche 2005-01-23 14:05:40 EST
Joanne and Charly, is all needed info present to have this on the U1
list? Both sysstat packages are nearly identical. Is the kernel
presenting information differently between the 2.4 and the 2.6 kernel?
Is the above bug-report happening with a cciss driver? What happens
if the RHEL3 package is recompiled on RHEL4?
Comment 9 Jay Turner 2005-01-27 04:00:05 EST
Figured out what's going on here.  Those extended statistics aren't even being
stored for the partitions with the 2.6 kernel (that is the extended statistics
aren't getting written to /proc/diskstats for partitions, only for the whole
disc.)  So this is really a feature request to get the partition statistics
written to /proc/diskstats (or somewhere) as well as modify iostat to read those
extended statistics from whatever file.

Case in point:

# cat /proc/diskstats | grep hda
   3    0 hda 196702 10352 6407296 8768514 56947 411127 3744748 1722429 0 634978
10490943
   3    1 hda1 1283 1553 3 4
   3    2 hda2 31228 1053066 73296 586368
   3    3 hda3 167933 4133602 59420 475360
   3    4 hda4 3 6 0 0
   3    5 hda5 6161 1217307 334946 2679512
   3    6 hda6 432 1546 438 3504

We have complete statistics for hda, but only partial stats for hda[1-6] hence
iostat doesn't allow you to specify the '-x' (display extended) along with the
'-p' (display block devices and their partitions) simultaneously.  'iostat -p'
will display basic stats for the partitions.  Removing from the U1 blocker list,
as this is a feature request and therefore shouldn't block U1.
Comment 14 Charlie Bennett 2005-01-27 14:08:08 EST
my bad:

[ccb@ccb ~]$ uname -r
2.6.9-4.ELsmp
[ccb@ccb ~]$ cat /proc/diskstats
   1    0 ram0 0 0 0 0 0 0 0 0 0 0 0
   1    1 ram1 0 0 0 0 0 0 0 0 0 0 0
   1    2 ram2 0 0 0 0 0 0 0 0 0 0 0
   1    3 ram3 0 0 0 0 0 0 0 0 0 0 0
   1    4 ram4 0 0 0 0 0 0 0 0 0 0 0
   1    5 ram5 0 0 0 0 0 0 0 0 0 0 0
   1    6 ram6 0 0 0 0 0 0 0 0 0 0 0
   1    7 ram7 0 0 0 0 0 0 0 0 0 0 0
   1    8 ram8 0 0 0 0 0 0 0 0 0 0 0
   1    9 ram9 0 0 0 0 0 0 0 0 0 0 0
   1   10 ram10 0 0 0 0 0 0 0 0 0 0 0
   1   11 ram11 0 0 0 0 0 0 0 0 0 0 0
   1   12 ram12 0 0 0 0 0 0 0 0 0 0 0
   1   13 ram13 0 0 0 0 0 0 0 0 0 0 0
   1   14 ram14 0 0 0 0 0 0 0 0 0 0 0
   1   15 ram15 0 0 0 0 0 0 0 0 0 0 0
   3    0 hda 520058 26056 14336811 5595258 795859 1569046 18943254 24520531 0
2896840 30118282
   3    1 hda1 677 1358 7 14
   3    2 hda2 219888 6584410 1833961 14671680
   3    3 hda3 2215 9417 917 7336
   3    4 hda4 3 6 0 0
   3    5 hda5 324190 7741220 533021 4264168
  22    0 hdc 0 0 0 0 0 0 0 0 0 0 0
   2    0 fd0 0 0 0 0 0 0 0 0 0 0 0
   9    0 md0 0 0 0 0 0 0 0 0 0 0 0
 253    0 dm-0 0 0 0 0 0 0 0 0 0 0 0
Comment 15 Charlie Bennett 2005-01-27 15:27:03 EST
      else if (i == 5) {
         /* Partition */
bug ->         if (DISPLAY_EXTENDED(flags) || (!dlist_idx &&
!DISPLAY_PARTITIONS(flag\s)))
            continue;
         sdev.rd_ios = tmp[0];   sdev.rd_sectors = tmp[1];
         sdev.wr_ios = l_tmp[0]; sdev.wr_sectors = tmp[2];
      }
 
Comment 16 Jay Turner 2005-01-28 03:44:01 EST
How so?  If we passed '-x' (DISPLAY_EXTENDED) we're going to skip displaying the
partition data because the extended partition data isn't present.  Otherwise if
we didn't ask for details on a specific partition, we're going to skip
displaying partition data.  If I run "iostat -p" then I get the summary
statistics for block devices and their partitions.  If I run "iostat -x" then
I'm only going to get extended stats for the block device.
Comment 17 Charlie Bennett 2005-02-01 16:37:22 EST
The upshot is this:

  sysstat can't display data the kernel no longer provides.


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