summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-09-07 06:02:40 +0000
committeradrian <adrian@FreeBSD.org>2012-09-07 06:02:40 +0000
commit652b16f79fc09d6858b57fd40727efee26f2704f (patch)
treeace7dd41fd6b17979510079cb987510f7019847f /tools
parentec006196aafd72006e5cdadb858737a9f8fb3f7b (diff)
downloadFreeBSD-src-652b16f79fc09d6858b57fd40727efee26f2704f.zip
FreeBSD-src-652b16f79fc09d6858b57fd40727efee26f2704f.tar.gz
Tidy up the output quite substantially, making it fit well within
80 columns. This makes it much easier to use in a shell script, to display a "top" style output with live rate control data.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/ath/athratestats/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/tools/ath/athratestats/main.c b/tools/tools/ath/athratestats/main.c
index ff3d646..55062ea 100644
--- a/tools/tools/ath/athratestats/main.c
+++ b/tools/tools/ath/athratestats/main.c
@@ -123,21 +123,21 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
sn->packets_since_sample[y],
sn->sample_tt[y]);
}
+ printf(" TX Rate TXTOTAL:TXOK EWMA T/ F"
+ " avg last xmit\n");
for (mask = sn->ratemask, rix = 0; mask != 0; mask >>= 1, rix++) {
if ((mask & 1) == 0)
continue;
for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) {
if (sn->stats[y][rix].total_packets == 0)
continue;
- printf("[%2u %s:%4u] %8ju:%-8ju (%3d%%) "
- "(EWMA %3d.%1d%%) T %8ju F %4d avg %5u last %u\n",
+ printf("[%2u %s:%4u] %8ju:%-8ju "
+ "(%3d.%1d%%) %8ju/%4d %5ums %u\n",
dot11rate(rt, rix),
dot11str(rt, rix),
bin_to_size(y),
(uintmax_t) sn->stats[y][rix].total_packets,
(uintmax_t) sn->stats[y][rix].packets_acked,
- (int) ((sn->stats[y][rix].packets_acked * 100ULL) /
- sn->stats[y][rix].total_packets),
sn->stats[y][rix].ewma_pct / 10,
sn->stats[y][rix].ewma_pct % 10,
(uintmax_t) sn->stats[y][rix].tries,
OpenPOWER on IntegriCloud