Activity log for bug #1888345

Date Who What changed Old value New value Message
2020-07-21 06:27:35 Fran Freire bug added bug
2020-07-21 06:37:29 Fran Freire description 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 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
2020-07-31 14:35:11 Rafael David Tinoco nominated for series Ubuntu Groovy
2020-07-31 14:35:11 Rafael David Tinoco bug task added sysstat (Ubuntu Groovy)
2020-07-31 14:35:11 Rafael David Tinoco nominated for series Ubuntu Focal
2020-07-31 14:35:11 Rafael David Tinoco bug task added sysstat (Ubuntu Focal)
2020-07-31 14:35:24 Rafael David Tinoco bug task deleted sysstat (Ubuntu Groovy)
2020-07-31 14:35:36 Rafael David Tinoco sysstat (Ubuntu): importance Undecided Low
2020-07-31 14:35:38 Rafael David Tinoco sysstat (Ubuntu Focal): importance Undecided Low
2020-07-31 14:35:46 Rafael David Tinoco sysstat (Ubuntu): status New Triaged
2020-07-31 14:35:49 Rafael David Tinoco sysstat (Ubuntu Focal): status New Triaged
2020-07-31 14:35:59 Rafael David Tinoco bug added subscriber Ubuntu Server
2020-07-31 14:44:11 Rafael David Tinoco tags focal bitesize focal
2021-01-28 13:38:04 Paride Legovini sysstat (Ubuntu): status Triaged Fix Released
2021-08-09 09:41:48 Miriam España Acebal sysstat (Ubuntu Focal): assignee Miriam España Acebal (mirespace)
2021-08-09 10:37:39 Miriam España Acebal sysstat (Ubuntu Focal): status Triaged In Progress
2021-08-09 16:05:41 Launchpad Janitor merge proposal linked https://code.launchpad.net/~mirespace/ubuntu/+source/sysstat/+git/sysstat/+merge/406820
2021-08-10 09:50:16 Miriam España Acebal nominated for series Ubuntu Bionic
2021-08-10 09:50:16 Miriam España Acebal bug task added sysstat (Ubuntu Bionic)
2021-08-10 09:50:25 Miriam España Acebal sysstat (Ubuntu Bionic): status New Invalid
2021-08-10 10:45:02 Miriam España Acebal description 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 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
2021-08-10 10:47:25 Miriam España Acebal description 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 [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
2021-08-11 11:27:04 Robie Basak sysstat (Ubuntu Focal): status In Progress Fix Committed
2021-08-11 11:27:06 Robie Basak bug added subscriber Ubuntu Stable Release Updates Team
2021-08-11 11:27:07 Robie Basak bug added subscriber SRU Verification
2021-08-11 11:27:10 Robie Basak tags bitesize focal bitesize focal verification-needed verification-needed-focal
2021-08-13 10:58:52 Miriam España Acebal tags bitesize focal verification-needed verification-needed-focal bitesize focal verification-done verification-done-focal
2021-08-18 15:23:31 Launchpad Janitor sysstat (Ubuntu Focal): status Fix Committed Fix Released
2021-08-18 15:23:35 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team
2021-09-17 14:01:57 Miriam España Acebal sysstat (Ubuntu Bionic): assignee Miriam España Acebal (mirespace)