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.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
{
char *units, *spc;
- if (DISPLAY_JSON_OUTPUT(flags)) {
- xprintf((*tab)++, "\"disk\": [");
- return;
- }
-
if (DISPLAY_KILOBYTES(flags)) {
*fctr = 2;
units = "kB";
spc = "";
}
+ if (DISPLAY_JSON_OUTPUT(flags)) {
+ xprintf((*tab)++, "\"disk\": [");
+ return;
+ }
+
if (!DISPLAY_HUMAN_READ(flags)) {
printf("Device ");
}