Add an option to disable the disk stats. And only dump the disk
stat header, if we actually have stats to show.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
cpuchunks=int If the job is a CPU cycle eater, split the load into
cycles of the given time. In milliseconds.
+disk_util=bool Generate disk utilization statistics, if the platform
+ supports it. Defaults to on.
+
6.0 Interpreting the output
---------------------------
struct disk_util *du;
double util;
+ if (list_empty(&disk_list))
+ return;
+
log_info("\nDisk stats (read/write):\n");
list_for_each(entry, &disk_list) {
def_thread.o.write_bw_log = write_bw_log;
def_thread.o.write_lat_log = write_lat_log;
-#ifdef FIO_HAVE_DISK_UTIL
- def_thread.o.do_disk_util = 1;
-#endif
-
return 0;
}
.off1 = td_var_offset(zero_buffers),
.help = "Init IO buffers to all zeroes",
},
+#ifdef FIO_HAVE_DISK_UTIL
+ {
+ .name = "disk_util",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(do_disk_util),
+ .help = "Log disk utilization stats",
+ .def = "1",
+ },
+#endif
{
.name = NULL,
},