[RHEL5] sar -b reports double actual values

Solution Verified - Updated -

Issue

  • On early RHEL5 kernels only disks had full statistics, not partitions
# uname -a
Linux host-168.example.com 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007
i686 i686 i386 GNU/Linux

# grep hda /proc/diskstats
   3    0 hda 2879 5763 254174 37589 992 1533 20196 42478 0 16521 80067
   3    1 hda1 971 1952 2 4
   3    2 hda2 6014 250002 2524 20192
   3    3 hda3 1605 1796 0 0
  • Whereas on later RHEL5 kernels (I've not determined when) the partitions also get full statistics
# uname -a
Linux host-60.example.com 2.6.18-308.el5 #1 SMP Fri Jan 27 17:21:15 EST 2012
i686 i686 i386 GNU/Linux

# grep vda /proc/diskstats
 253    0 vda 4976 5330 292888 99924 1526 12600 112996 674339 0 62040 774265
 253    1 vda1 54 782 1688 322 2 0 4 241 0 563 563
 253    2 vda2 4876 3383 289777 99289 1524 12600 112992 674098 0 61402 773390
 253    3 vda3 36 1149 1215 223 0 0 0 0 0 188 223
  • The data collector for sysstat parses the /proc/diskstats file for the full statistics lines and sums the results for the file stats that are subsequently output by sar -b.
  • So, when it gets partition statistics as well it double accounts.

Environment

  • Red Hat Enterprise Linux 5.7
  • sysstat-7.0.2-11.el5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In