diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2015-03-24 16:09:34 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-04-01 05:22:39 -0400 |
commit | e161f7f6c4143ef0d945e98b2d1032cf82939fb6 (patch) | |
tree | 889dff3d2010e28236511a0177c5228c1a6e29ea /net | |
parent | c37722bd1972118142ee54c0e1a727142d944068 (diff) |
mac80211: enhance readability of Minstrels rc_stats output
This patch restructures the rc_stats debugfs table of Minstrel in
order to achieve better human readability. A new layout of the
statistics and a new header is added. In addition to the old layout
there are two new columns of information added:
idx - representing the rate index of each rate in mac80211 which
can be used to set specific rates as fixed rate via debugfs
airtime - the tx-time in micro seconds that a 1200 Byte packet
takes to be transmitted over the air at the given rate
The old layout of rc_stats:
rate tpt eprob *prob ret *ok(*cum) ok( cum)
DP 1 0.9 93.5 100.0 1 0( 0) 2( 2)
2 0.4 40.0 100.0 0 0( 0) 4( 10)
5.5 0.0 0.0 0.0 0 0( 0) 0( 0)
...
is changed into this new layout:
best _______rate_____ __statistics__ ________last_______ ______sum-of________
rate [name idx tx-time] [ ø(tp) ø(prob)] [prob.|retry|suc|att] [#success | #attempts]
DP 1 0 9738 0.9 93.5 100.0 1 1 1 2 2
2 1 4922 0.4 40.0 100.0 1 0 0 4 10
5.5 2 1858 0.0 0.0 0.0 2 0 0 0 0
...
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Stefan Venz <ikstream86@gmail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rc80211_minstrel_debugfs.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c index 2acab1bcaa4b..2d70081a77eb 100644 --- a/net/mac80211/rc80211_minstrel_debugfs.c +++ b/net/mac80211/rc80211_minstrel_debugfs.c | |||
@@ -68,8 +68,12 @@ minstrel_stats_open(struct inode *inode, struct file *file) | |||
68 | 68 | ||
69 | file->private_data = ms; | 69 | file->private_data = ms; |
70 | p = ms->buf; | 70 | p = ms->buf; |
71 | p += sprintf(p, "rate tpt eprob *prob" | 71 | p += sprintf(p, "\n"); |
72 | " *ok(*cum) ok( cum)\n"); | 72 | p += sprintf(p, "best _______rate_____ __statistics__ " |
73 | "________last_______ ______sum-of________\n"); | ||
74 | p += sprintf(p, "rate [name idx airtime] [ ø(tp) ø(prob)] " | ||
75 | "[prob.|retry|suc|att] [#success | #attempts]\n"); | ||
76 | |||
73 | for (i = 0; i < mi->n_rates; i++) { | 77 | for (i = 0; i < mi->n_rates; i++) { |
74 | struct minstrel_rate *mr = &mi->r[i]; | 78 | struct minstrel_rate *mr = &mi->r[i]; |
75 | struct minstrel_rate_stats *mrs = &mi->r[i].stats; | 79 | struct minstrel_rate_stats *mrs = &mi->r[i].stats; |
@@ -79,18 +83,22 @@ minstrel_stats_open(struct inode *inode, struct file *file) | |||
79 | *(p++) = (i == mi->max_tp_rate[2]) ? 'C' : ' '; | 83 | *(p++) = (i == mi->max_tp_rate[2]) ? 'C' : ' '; |
80 | *(p++) = (i == mi->max_tp_rate[3]) ? 'D' : ' '; | 84 | *(p++) = (i == mi->max_tp_rate[3]) ? 'D' : ' '; |
81 | *(p++) = (i == mi->max_prob_rate) ? 'P' : ' '; | 85 | *(p++) = (i == mi->max_prob_rate) ? 'P' : ' '; |
82 | p += sprintf(p, "%3u%s", mr->bitrate / 2, | 86 | |
87 | p += sprintf(p, " %3u%s ", mr->bitrate / 2, | ||
83 | (mr->bitrate & 1 ? ".5" : " ")); | 88 | (mr->bitrate & 1 ? ".5" : " ")); |
89 | p += sprintf(p, "%3u ", i); | ||
90 | p += sprintf(p, "%6u ", mr->perfect_tx_time); | ||
84 | 91 | ||
85 | tp = MINSTREL_TRUNC(mrs->cur_tp / 10); | 92 | tp = MINSTREL_TRUNC(mrs->cur_tp / 10); |
86 | prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); | 93 | prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); |
87 | eprob = MINSTREL_TRUNC(mrs->probability * 1000); | 94 | eprob = MINSTREL_TRUNC(mrs->probability * 1000); |
88 | 95 | ||
89 | p += sprintf(p, " %4u.%1u %3u.%1u %3u.%1u" | 96 | p += sprintf(p, " %4u.%1u %3u.%1u %3u.%1u %3u" |
90 | " %4u(%4u) %9llu(%9llu)\n", | 97 | " %3u %-3u %9llu %-9llu\n", |
91 | tp / 10, tp % 10, | 98 | tp / 10, tp % 10, |
92 | eprob / 10, eprob % 10, | 99 | eprob / 10, eprob % 10, |
93 | prob / 10, prob % 10, | 100 | prob / 10, prob % 10, |
101 | mrs->retry_count, | ||
94 | mrs->last_success, | 102 | mrs->last_success, |
95 | mrs->last_attempts, | 103 | mrs->last_attempts, |
96 | (unsigned long long)mrs->succ_hist, | 104 | (unsigned long long)mrs->succ_hist, |