diff options
author | Richard Elling <[email protected]> | 2018-12-11 13:56:54 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-12-11 13:56:54 -0800 |
commit | a48cd034c8df96ab751179b0c15bf84c6e178967 (patch) | |
tree | 848ec25ff9723c998deb784cffdcd623a3b97788 | |
parent | fa61e72340c1b47f33b5290e5eeb7e05e62eabf0 (diff) |
Seeing negative values for wlentime and rlentime
Linux kstat IO and TIMER printed values as signed. However the counters
only increment. Thus humans looking at the data can be confused when
the counters roll over.
Note: The recommended use of these values is to monitor the derivative,
which don't really care about the sign. See explanations related to
non-negative derivatives in the various time-series databases.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Richard Elling <[email protected]>
Closes #8131
Closes #8198
-rw-r--r-- | module/spl/spl-kstat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 8683693c8..7207a35e0 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -261,9 +261,10 @@ kstat_seq_show_intr(struct seq_file *f, kstat_intr_t *kip) static int kstat_seq_show_io(struct seq_file *f, kstat_io_t *kip) { + /* though wlentime & friends are signed, they will never be negative */ seq_printf(f, - "%-8llu %-8llu %-8u %-8u %-8lld %-8lld " - "%-8lld %-8lld %-8lld %-8lld %-8u %-8u\n", + "%-8llu %-8llu %-8u %-8u %-8llu %-8llu " + "%-8llu %-8llu %-8llu %-8llu %-8u %-8u\n", kip->nread, kip->nwritten, kip->reads, kip->writes, kip->wtime, kip->wlentime, kip->wlastupdate, @@ -277,7 +278,7 @@ static int kstat_seq_show_timer(struct seq_file *f, kstat_timer_t *ktp) { seq_printf(f, - "%-31s %-8llu %-8lld %-8lld %-8lld %-8lld %-8lld\n", + "%-31s %-8llu %-8llu %-8llu %-8llu %-8llu %-8llu\n", ktp->name, ktp->num_events, ktp->elapsed_time, ktp->min_time, ktp->max_time, ktp->start_time, ktp->stop_time); |