From owner-svn-src-head@FreeBSD.ORG Fri Sep 7 06:02:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F72106564A; Fri, 7 Sep 2012 06:02:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73B018FC08; Fri, 7 Sep 2012 06:02:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8762fDD048957; Fri, 7 Sep 2012 06:02:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8762fTE048955; Fri, 7 Sep 2012 06:02:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209070602.q8762fTE048955@svn.freebsd.org> From: Adrian Chadd Date: Fri, 7 Sep 2012 06:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240184 - head/tools/tools/ath/athratestats X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 06:02:41 -0000 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,