'sar -u ALL' reports an overflow value

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • sysstat-9.0.4-11.el6.x86_64

Issue

  • "sar -u ALL -P ALL 1 1000" reports an overflow value as follows.
    # sar -u ALL -P ALL 1 1000
     Linux 2.6.32-70.el6.x86_64 (shiro-kumarl)       09/08/10        _x86_64_        (8 CPU)
     ...
     14:42:02        CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest     %idle
     14:42:03        all      2.46      0.00      3.04      0.82      0.00      0.00      0.00      0.23     93.45
     14:42:03          0      5.94      0.00      8.91      0.99      0.00      0.00      0.00      0.00     84.16
     14:42:03          1      4.55      0.00      2.27      0.00      0.00      0.00      0.00      1.14     92.05
     14:42:03          2      2.83      0.00      1.89      0.00      0.00      0.00      0.00      0.00     95.28
     14:42:03          3      0.98      0.00      3.92      0.00      0.00      0.00      0.00      0.00     95.10
     14:42:03          4      3.74      0.00      6.54      2.80      0.00      0.00      0.00      0.00     86.92
     14:42:03          5      1.96      0.00      1.96      0.00      0.00      0.00      0.00      0.00     96.08
     14:42:03          6    5506368326.92      0.00      1.28      2.56      0.00      0.00      0.00      1.28     96.15
     14:42:03          7      0.58      0.00      0.00      1.17      0.00      0.00      0.00      0.00     98.25
     ....
    
  • A value of %usr for CPU 6, 5506368326.92, is an overflow value.

Resolution

  • In sysstat, check the case that guest is incremented but the user is not incremented.
  • Please update sysstat package with: RHBA-2011:0668

Root Cause

  • There is a case that the value of guest is incremented but the value of user is not incremented in /proc/stat.
  • In kernel, when the guest is accounted, the user also is accounted at the same time in account_guest_time() of kernel.
  • But, when the value outputed to /proc/stat actually is culculated, there is a case that the value of user is not incremented although the value of guest is incremented.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.