svn commit: r240184 - head/tools/tools/ath/athratestats
Adrian Chadd
adrian at FreeBSD.org
Fri Sep 7 06:02:41 UTC 2012
Author: adrian
Date: Fri Sep 7 06:02:40 2012
New Revision: 240184
URL: http://svn.freebsd.org/changeset/base/240184
Log:
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.
Modified:
head/tools/tools/ath/athratestats/main.c
Modified: head/tools/tools/ath/athratestats/main.c
==============================================================================
--- head/tools/tools/ath/athratestats/main.c Fri Sep 7 06:02:01 2012 (r240183)
+++ head/tools/tools/ath/athratestats/main.c Fri Sep 7 06:02:40 2012 (r240184)
@@ -123,21 +123,21 @@ ath_sample_stats(struct ath_ratestats *r
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,
More information about the svn-src-all
mailing list