diskutil: Report how many sectors have been read and written
authorBart Van Assche <bvanassche@acm.org>
Thu, 13 Jul 2023 19:44:54 +0000 (12:44 -0700)
committerBart Van Assche <bvanassche@acm.org>
Thu, 13 Jul 2023 19:51:27 +0000 (12:51 -0700)
It is useful to know how much data has been read and/or written. Report
this information.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
HOWTO.rst
fio.1
stat.c

index b047877ea3cefc791b7fc414d8aa843fb9c7ccda..7ae8ea7b2b6deb8441a6e9deffd50be32a31c79a 100644 (file)
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -4528,13 +4528,15 @@ For each data direction it prints:
 And finally, the disk statistics are printed. This is Linux specific. They will look like this::
 
   Disk stats (read/write):
-    sda: ios=16398/16511, merge=30/162, ticks=6853/819634, in_queue=826487, util=100.00%
+    sda: ios=16398/16511, sectors=32321/65472, merge=30/162, ticks=6853/819634, in_queue=826487, util=100.00%
 
 Each value is printed for both reads and writes, with reads first. The
 numbers denote:
 
 **ios**
                Number of I/Os performed by all groups.
+**sectors**
+               Amount of data transferred in units of 512 bytes for all groups.
 **merge**
                Number of merges performed by the I/O scheduler.
 **ticks**
diff --git a/fio.1 b/fio.1
index 86cb2af683b466fdb12243a5c6aa17e5ee274b24..da8752767f5830ba51de74f8f214c88fcb91da7a 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -4184,7 +4184,7 @@ They will look like this:
 .P
 .nf
                  Disk stats (read/write):
-                   sda: ios=16398/16511, merge=30/162, ticks=6853/819634, in_queue=826487, util=100.00%
+                   sda: ios=16398/16511, sectors=32321/65472, merge=30/162, ticks=6853/819634, in_queue=826487, util=100.00%
 .fi
 .P
 Each value is printed for both reads and writes, with reads first. The
diff --git a/stat.c b/stat.c
index 015b8e280ff27fec6174ae0d7f9c436867d64559..ced7364563427b32d30956c4fb1a20662a26f6cb 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1030,11 +1030,14 @@ void print_disk_util(struct disk_util_stat *dus, struct disk_util_agg *agg,
                if (agg->slavecount)
                        log_buf(out, "  ");
 
-               log_buf(out, "  %s: ios=%llu/%llu, merge=%llu/%llu, "
-                        "ticks=%llu/%llu, in_queue=%llu, util=%3.2f%%",
+               log_buf(out, "  %s: ios=%llu/%llu, sectors=%llu/%llu, "
+                       "merge=%llu/%llu, ticks=%llu/%llu, in_queue=%llu, "
+                       "util=%3.2f%%",
                                dus->name,
                                (unsigned long long) dus->s.ios[0],
                                (unsigned long long) dus->s.ios[1],
+                               (unsigned long long) dus->s.sectors[0],
+                               (unsigned long long) dus->s.sectors[1],
                                (unsigned long long) dus->s.merges[0],
                                (unsigned long long) dus->s.merges[1],
                                (unsigned long long) dus->s.ticks[0],