All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, nbd@nbd.name, thomas@net.t-labs.tu-berlin.de
Subject: [PATCH v2 01/10] mac80211: enhance readability of Minstrels rc_stats output
Date: Fri, 13 Feb 2015 15:57:43 +0100	[thread overview]
Message-ID: <1423839472-15625-2-git-send-email-thomas@net.t-labs.tu-berlin.de> (raw)
In-Reply-To: <1423839472-15625-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

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>
---
 net/mac80211/rc80211_minstrel_debugfs.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
index 2acab1b..2d70081 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)
 
 	file->private_data = ms;
 	p = ms->buf;
-	p += sprintf(p, "rate          tpt eprob *prob"
-			"  *ok(*cum)        ok(      cum)\n");
+	p += sprintf(p, "\n");
+	p += sprintf(p, "best   _______rate_____    __statistics__    "
+			"________last_______    ______sum-of________\n");
+	p += sprintf(p, "rate  [name idx airtime]  [ ø(tp) ø(prob)]  "
+			"[prob.|retry|suc|att]  [#success | #attempts]\n");
+
 	for (i = 0; i < mi->n_rates; i++) {
 		struct minstrel_rate *mr = &mi->r[i];
 		struct minstrel_rate_stats *mrs = &mi->r[i].stats;
@@ -79,18 +83,22 @@ minstrel_stats_open(struct inode *inode, struct file *file)
 		*(p++) = (i == mi->max_tp_rate[2]) ? 'C' : ' ';
 		*(p++) = (i == mi->max_tp_rate[3]) ? 'D' : ' ';
 		*(p++) = (i == mi->max_prob_rate) ? 'P' : ' ';
-		p += sprintf(p, "%3u%s", mr->bitrate / 2,
+
+		p += sprintf(p, " %3u%s ", mr->bitrate / 2,
 				(mr->bitrate & 1 ? ".5" : "  "));
+		p += sprintf(p, "%3u  ", i);
+		p += sprintf(p, "%6u  ", mr->perfect_tx_time);
 
 		tp = MINSTREL_TRUNC(mrs->cur_tp / 10);
 		prob = MINSTREL_TRUNC(mrs->cur_prob * 1000);
 		eprob = MINSTREL_TRUNC(mrs->probability * 1000);
 
-		p += sprintf(p, " %4u.%1u %3u.%1u %3u.%1u"
-				" %4u(%4u) %9llu(%9llu)\n",
+		p += sprintf(p, " %4u.%1u   %3u.%1u     %3u.%1u %3u"
+				"   %3u %-3u   %9llu   %-9llu\n",
 				tp / 10, tp % 10,
 				eprob / 10, eprob % 10,
 				prob / 10, prob % 10,
+				mrs->retry_count,
 				mrs->last_success,
 				mrs->last_attempts,
 				(unsigned long long)mrs->succ_hist,
-- 
2.2.2


  reply	other threads:[~2015-02-13 14:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 14:57 [PATCH v2 0/10] Improve Minstrels & Minstrel-HTs common code base & statistics Thomas Huehn
2015-02-13 14:57 ` Thomas Huehn [this message]
2015-02-13 14:57 ` [PATCH v2 02/10] mac80211: enhance readability of Minstrel-HTs rc_stats output Thomas Huehn
2015-02-13 14:57 ` [PATCH v2 03/10] mac80211: add new Minstrel statistic output via csv Thomas Huehn
2015-03-17  8:16   ` Felix Fietkau
2015-02-13 14:57 ` [PATCH v2 04/10] mac80211: add new Minstrel-HT " Thomas Huehn
2015-03-17  8:18   ` Felix Fietkau
2015-02-13 14:57 ` [PATCH v2 05/10] mac80211: unify Minstrel & Minstrel-HTs calculation of rate statistics Thomas Huehn
2015-02-13 14:57 ` [PATCH v2 06/10] mac80211: improve Minstrel variable & function naming Thomas Huehn
2015-02-13 14:57 ` [PATCH v2 07/10] mac80211: restructure per-rate throughput calculation into function Thomas Huehn
2015-03-17  8:24   ` Felix Fietkau
2015-02-13 14:57 ` [PATCH v2 08/10] mac80211: add max. lossless throughput per rate to rc_stats Thomas Huehn
2015-03-17  8:32   ` Felix Fietkau
2015-02-13 14:57 ` [PATCH v2 09/10] mac80211: reduce calculation costs of EWMA Thomas Huehn
2015-02-13 14:57 ` [PATCH v2 10/10] mac80211: add standard deviation to Minstrels throughput statistic Thomas Huehn
2015-02-25 21:00 ` [PATCH v2 0/10] Improve Minstrels & Minstrel-HTs common code base & statistics Bastian Bittorf
2015-02-25 21:18 ` Bastian Bittorf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423839472-15625-2-git-send-email-thomas@net.t-labs.tu-berlin.de \
    --to=thomas@net.t-labs.tu-berlin.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.