Bug 379661 - The entire output of "major-num" and "minor-num" on "sar -d" cannot be displayed.
Summary: The entire output of "major-num" and "minor-num" on "sar -d" cannot be displa...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sysstat
Version: 5.1
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Ivana Varekova
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-13 10:41 UTC by Masaki MAENO
Modified: 2007-11-19 11:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-19 11:56:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Masaki MAENO 2007-11-13 10:41:23 UTC
Description of problem:

For instance, the display of "major-num" and "minor-num" overflows for cciss
bacause each number are treble.

[root@kern-dl04 cciss]# LANG=C sar -d 1 1
Linux 2.6.18-53.el5 (kern-dl04)         11/14/07

04:25:46          DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz    
await     svctm     %util
                     ...
04:25:47     dev104-0      0.00      0.00      0.00      0.00      0.00     
0.00      0.00      0.00
04:25:47    dev104-16      0.00      0.00      0.00      0.00      0.00     
0.00      0.00      0.00
                     ...
04:25:47    dev104-96      0.00      0.00      0.00      0.00      0.00     
0.00      0.00      0.00
04:25:47    dev104-11      0.00      0.00      0.00      0.00      0.00     
0.00      0.00      0.00
                   ^^^<----- overflow and non-display "dev104-112"
                     ...

[root@kern-dl04 cciss]# LANG=C ls -Al /dev/cciss
total 0
brw-r----- 1 root disk 104,  0 Nov 13 23:53 c0d0
brw-r----- 1 root disk 104,  1 Nov 13 23:53 c0d0p1
brw-r----- 1 root disk 104,  2 Nov 13 23:53 c0d0p2
brw-r----- 1 root disk 104,  3 Nov 13 23:53 c0d0p3
                     ...
brw-r----- 1 root disk 104, 96 Nov 13 23:53 c0d6
brw-r----- 1 root disk 104, 97 Nov 13 23:53 c0d6p1
brw-r----- 1 root disk 104, 98 Nov 13 23:53 c0d6p2
brw-r----- 1 root disk 104, 112 Nov 13 23:53 c0d7
brw-r----- 1 root disk 104, 113 Nov 13 23:53 c0d7p1
brw-r----- 1 root disk 104, 114 Nov 13 23:53 c0d7p2
                     ...


Please correct it as follows from - to + . 
(The format is matches to sysstat version 5) 

* systat-7.0.0.3.el5 sar.c write_stats_core(): 
683           arqsz  = (sdi->nr_ios - sdj->nr_ios) ?
684              ((sdi->rd_sect - sdj->rd_sect) + (sdi->wr_sect - sdj->wr_sect)) /
685              ((double) (sdi->nr_ios - sdj->nr_ios)) : 0.0;
686
687-          printf("%-11s %9s %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f\n",
687+          printf("%-11s %11s %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f\n",
688                  curr_string,
689                  /* Confusion possible here between index and minor numbers */
690                  get_devname(sdi->major, sdi->minor, USE_PRETTY_OPTION(flags)),
691                  S_VALUE(sdj->nr_ios, sdi->nr_ios,  itv),
692                  ll_s_value(sdj->rd_sect, sdi->rd_sect, itv),
693                  ll_s_value(sdj->wr_sect, sdi->wr_sect, itv),
694                  /* See iostat for explanations */
695                  arqsz,
696                  S_VALUE(sdj->rq_ticks, sdi->rq_ticks, itv) / 1000.0,
697                  await,
698                  svctm,
699                  util / 10.0);

Version-Release number of selected component (if applicable):
  kexec-tools: RHEL5.0 - RHEL5.1 (1.101-194.4.el5)

How reproducible:

  When the total digit of "major-num" and "minor-num" are six digits or more,
  you execute "sar -d".

Actual results:

  Non-display "minor-num"

  ex: dev104-11

Expected results:

  Display "minor-num"

  ex: dev104-112

Comment 2 RHEL Program Management 2007-11-14 08:54:18 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Ivana Varekova 2007-11-16 13:05:30 UTC
Please could you attach here your /poc/diskstats file?

Comment 4 Masaki MAENO 2007-11-19 01:20:53 UTC
Sorry.
The information from our development-department that I had gotten was wrong.
The environment was not RHEL5 but RHEL4.

I confirmed that the problem was corrected at sysstat-5.0.5-16.rhel4 (RHEL4
latest version).

Please close this issue.


Comment 5 Masaki MAENO 2007-11-19 05:16:50 UTC
Supplement:
  RHEL4 sysstat-5.0.5-15.0.1.rhel4 - printf format: %9.9s (up to 9 strings, left
align)
  ---> RHEL4 sysstat-5.0.5-16.rhel4 - printf format: %-11s (right align)



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