summaryrefslogtreecommitdiffstats
path: root/bin/iostats
diff options
context:
space:
mode:
Diffstat (limited to 'bin/iostats')
-rwxr-xr-xbin/iostats6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/iostats b/bin/iostats
index 0e96e29..6728027 100755
--- a/bin/iostats
+++ b/bin/iostats
@@ -78,6 +78,8 @@ if (!$fast) {
print "="x36, "\n";
printf("Write: %8d calls, %10d total bytes, %10g average bytes\n",
- $total_writes, $total_bytes_out, $total_bytes_out/$total_writes);
+ $total_writes, $total_bytes_out, $total_bytes_out/$total_writes)
+ if $total_writes;
printf("Read: %8d calls, %10d total bytes, %10g average bytes\n",
- $total_reads, $total_bytes_in, $total_bytes_in/$total_reads);
+ $total_reads, $total_bytes_in, $total_bytes_in/$total_reads)
+ if $total_reads;