diff options
author | Thomas Graf <tgraf@suug.ch> | 2016-01-29 12:11:44 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2016-01-29 12:11:44 +0100 |
commit | 4efaa8ce9e82777d1208688e5bad833043587d81 (patch) | |
tree | 8e7216b8ee66bbbe754e40f82a6bee656d3b41bb /src/out_format.c | |
parent | 1f79ea4396d4e1fb7d7042ab54552b33f082c7dc (diff) |
curses: Add ability to reset statistics
Press 'r' in curses mode to reset a statistic counter to
start counting from 0 again. This does NOT reset the
counter from the source itself but merely emulates a
counter reset. If you restart bmon, the counter will be
back to its total value.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'src/out_format.c')
-rw-r--r-- | src/out_format.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/out_format.c b/src/out_format.c index ab07408..d9d5e36 100644 --- a/src/out_format.c +++ b/src/out_format.c @@ -123,10 +123,10 @@ static char *get_token(struct element_group *g, struct element *e, goto out; if (!strncasecmp(type, "rx:", 3)) { - snprintf(buf, len, "%" PRIu64, a->a_rx_rate.r_total); + snprintf(buf, len, "%" PRIu64, rate_get_total(&a->a_rx_rate)); return buf; } else if (!strncasecmp(type, "tx:", 3)) { - snprintf(buf, len, "%" PRIu64, a->a_tx_rate.r_total); + snprintf(buf, len, "%" PRIu64, rate_get_total(&a->a_tx_rate)); return buf; } else if (!strncasecmp(type, "rxrate:", 7)) { snprintf(buf, len, "%.2f", a->a_rx_rate.r_rate); |