** Description changed: 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 + + --- + [SRU] + + [Impact] + In iostat (Focal), when using output option JSON, the values for the number of megabytes written to the device per second (wMB/s) are wrong (they are expressed in blocks/s instead). + + [Test Case] + Using the command "iostat <device> -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 (<device> can be from lsblk output in case of doubt). + + Results for Focal (VM): + Before (spoiler: 0.23 vs 483.45 wMB/s): + - Non JSON output: https://pastebin.canonical.com/p/vXJ2xQPXW3/ + - JSON output: https://pastebin.canonical.com/p/ncGvCzgHCg/ + + After (spoiler: 0.03 vs 0.03 wMB/s): + - Non JSON output: https://pastebin.canonical.com/p/QhmWBHXCcG/ + - JSON output: https://pastebin.canonical.com/p/XWQtNGHNkP/ + + PPA with built package with fix for testing: + https://launchpad.net/~mirespace/+archive/ubuntu/srus/+packages ( + ppa:mirespace/srus ) + + [Where Problems Could Occur] + This patch is cherry picked from upstream, so the bug is corrected in following sysstat package versions, only affects iostat commad. + + If the problem was not noticed by a Focal user could be led to + strangeness if this output is used in custom scripts. + + [Other Info] + Fixed upstream in version 12.3.1, commit id:404eee1417dad8abe6ef49ea6e1469fe6cfdddbe + Commit description: iostat: Fix wrong unit used in JSON output + + The values for the amount of data read/written or discarded were always + expressed in blocks/s in the JSON output generated by iostat. It should + take into account the unit (blocks, kB, MB) selected by the user. + + Bug on upstream: https://github.com/sysstat/sysstat/issues/264 + + [Original Report] + https://bugs.launchpad.net/ubuntu/+source/sysstat/+bug/1888345/comments/0
** Description changed: + + [SRU] + + [Impact] + In iostat (Focal), when using output option JSON, the values for the number of megabytes written to the device per second (wMB/s) are wrong (they are expressed in blocks/s instead). + + [Test Case] + Using the command "iostat <device> -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 (<device> can be from lsblk output in case of doubt). + + Results for Focal (VM): + Before (spoiler: 0.23 vs 483.45 wMB/s): + - Non JSON output: https://pastebin.canonical.com/p/vXJ2xQPXW3/ + - JSON output: https://pastebin.canonical.com/p/ncGvCzgHCg/ + + After (spoiler: 0.03 vs 0.03 wMB/s): + - Non JSON output: https://pastebin.canonical.com/p/QhmWBHXCcG/ + - JSON output: https://pastebin.canonical.com/p/XWQtNGHNkP/ + + PPA with built package with fix for testing: + https://launchpad.net/~mirespace/+archive/ubuntu/srus/+packages ( + ppa:mirespace/srus ) + + [Where Problems Could Occur] + This patch is cherry picked from upstream, so the bug is corrected in following sysstat package versions, only affects iostat commad. + + If the problem was not noticed by a Focal user could be led to + strangeness if this output is used in custom scripts. + + [Other Info] + Fixed upstream in version 12.3.1, commit id:404eee1417dad8abe6ef49ea6e1469fe6cfdddbe + Commit description: iostat: Fix wrong unit used in JSON output + + The values for the amount of data read/written or discarded were always + expressed in blocks/s in the JSON output generated by iostat. It should + take into account the unit (blocks, kB, MB) selected by the user. + + Bug on upstream: https://github.com/sysstat/sysstat/issues/264 + + [Original Report] + --- + 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 - - --- - [SRU] - - [Impact] - In iostat (Focal), when using output option JSON, the values for the number of megabytes written to the device per second (wMB/s) are wrong (they are expressed in blocks/s instead). - - [Test Case] - Using the command "iostat <device> -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 (<device> can be from lsblk output in case of doubt). - - Results for Focal (VM): - Before (spoiler: 0.23 vs 483.45 wMB/s): - - Non JSON output: https://pastebin.canonical.com/p/vXJ2xQPXW3/ - - JSON output: https://pastebin.canonical.com/p/ncGvCzgHCg/ - - After (spoiler: 0.03 vs 0.03 wMB/s): - - Non JSON output: https://pastebin.canonical.com/p/QhmWBHXCcG/ - - JSON output: https://pastebin.canonical.com/p/XWQtNGHNkP/ - - PPA with built package with fix for testing: - https://launchpad.net/~mirespace/+archive/ubuntu/srus/+packages ( - ppa:mirespace/srus ) - - [Where Problems Could Occur] - This patch is cherry picked from upstream, so the bug is corrected in following sysstat package versions, only affects iostat commad. - - If the problem was not noticed by a Focal user could be led to - strangeness if this output is used in custom scripts. - - [Other Info] - Fixed upstream in version 12.3.1, commit id:404eee1417dad8abe6ef49ea6e1469fe6cfdddbe - Commit description: iostat: Fix wrong unit used in JSON output - - The values for the amount of data read/written or discarded were always - expressed in blocks/s in the JSON output generated by iostat. It should - take into account the unit (blocks, kB, MB) selected by the user. - - Bug on upstream: https://github.com/sysstat/sysstat/issues/264 - - [Original Report] - https://bugs.launchpad.net/ubuntu/+source/sysstat/+bug/1888345/comments/0 -- 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 ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs