Public bug reported:

We are migrating our servers to Ubuntu Focal and we have noticed that
our custom charts show unreal values for disk usage.

The issue only happens when you choose the JSON output flag. We have
already open an issue on github and the maintainer confirmed the bug.
https://github.com/sysstat/sysstat/issues/264

I have checked that on version 12.3.4 it's solved, but Ubuntu Focal uses
12.2.0 and this version is affected by the issue.

This is the commit with the fix:
https://github.com/sysstat/sysstat/commit/404eee1417dad8abe6ef49ea6e1469fe6cfdddbe


These are the steps to reproduce the issue. We use the command iostat /dev/sdb 
-dmx 1 -o JSON in one terminal and the same command whithout -o JSON in another 
one, and you'll see that all the values match except wMB/s, I attach three 
examples below:


"disk": [
        {"disk_device": "nvme0n1", "r/s": 0.00, "w/s": 31.00, "d/s": 0.00, 
"rMB/s": 0.00, "wMB/s": 248.00, "dMB/s": 0.00, "rrqm/s": 0.00, "wrqm/s": 0.00, 
"drqm/s": 0.00, "rrqm": 0.00, "wrqm": 0.00, "drqm": 0.00, "r_await": 0.00, 
"w_await": 1.87, "d_await": 0.00, "rareq-sz": 0.00, "wareq-sz": 4.00, 
"dareq-sz": 0.00, "aqu-sz": 0.00, "util": 0.80}
        ]

Device            r/s     rMB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     
wMB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dMB/s   drqm/s  %drqm 
d_await dareq-sz  aqu-sz  %util
nvme0n1          0,00      0,00     0,00   0,00    0,00     0,00   31,00      
0,12     0,00   0,00    1,87     4,00    0,00      0,00     0,00   0,00    0,00 
    0,00    0,00   0,80


"disk": [
        {"disk_device": "sdc", "r/s": 0.00, "w/s": 2.00, "d/s": 0.00, "rMB/s": 
0.00, "wMB/s": 24.00, "dMB/s": 0.00, "rrqm/s": 0.00, "wrqm/s": 1.00, "drqm/s": 
0.00, "rrqm": 0.00, "wrqm": 33.33, "drqm": 0.00, "r_await": 0.00, "w_await": 
2.00, "d_await": 0.00, "rareq-sz": 0.00, "wareq-sz": 6.00, "dareq-sz": 0.00, 
"aqu-sz": 0.00, "util": 0.40}
        ]

Device            r/s     rMB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     
wMB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dMB/s   drqm/s  %drqm 
d_await dareq-sz  aqu-sz  %util
sdc              0.00      0.00     0.00   0.00    0.00     0.00    2.00      
0.01     1.00  33.33    2.00     6.00    0.00      0.00     0.00   0.00    0.00 
    0.00    0.00   0.40


"disk": [
        {"disk_device": "sdb", "r/s": 0.00, "w/s": 35.00, "d/s": 0.00, "rMB/s": 
0.00, "wMB/s": 280.00, "dMB/s": 0.00, "rrqm/s": 0.00, "wrqm/s": 0.00, "drqm/s": 
0.00, "rrqm": 0.00, "wrqm": 0.00, "drqm": 0.00, "r_await": 0.00, "w_await": 
0.11, "d_await": 0.00, "rareq-sz": 0.00, "wareq-sz": 4.00, "dareq-sz": 0.00, 
"aqu-sz": 0.00, "util": 0.40}
        ]

Device            r/s     rMB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     
wMB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dMB/s   drqm/s  %drqm 
d_await dareq-sz  aqu-sz  %util
sdb              0.00      0.00     0.00   0.00    0.00     0.00   35.00      
0.14     0.00   0.00    0.11     4.00    0.00      0.00     0.00   0.00    0.00 
    0.00    0.00   0.40

** Affects: sysstat (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1888345

Title:
  Incorrect values  on iostat command when using JSON output

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysstat/+bug/1888345/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to