Skip to contentSkip to conversation

mountstats: Add option to pretty-print xprt statistics

RFC PATCH New Chuck Lever 1 participant 1 message Dec 2, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH v3 1/1 mountstats: Add option to pretty-print xprt statistics

Add "-x" option to display the statistics reported on the "xprt:" line in mountstats. This is not terribly interesting for UDP and TCP, but it can be for RDMA transports.

Changes since v2:
- Display mount point whose statistics are being printed

Changes since v1:
- Use %d when displaying numeric values
- On older kernels, the number of items in words[] can be less than the number of keys in XprtRdmaCounters, need to tolerate that

---
 tools/mountstats/mountstats.man |    5 ++
 tools/mountstats/mountstats.py  |  105 +++++++++++++++++++++++++++++++++++----
 2 files changed, 99 insertions(+), 11 deletions(-)
 mode change 100644 => 100755 tools/mountstats/mountstats.py
tools/mountstats/mountstats.man +5 -0
index a55130b..ff2f8ba 100644
@@ -19,6 +19,8 @@ mountstats \- Displays various NFS client per-mount statistics
 .RB [ \-r | \-\-rpc ]
 |
 .RB  [ \-R | \-\-raw ]
+|
+.RB  [ \-x | \-\-xprt ]
 ]
 .RI [ mountpoint ] ...
 .P
@@ -110,6 +112,9 @@ Display only the raw statistics.  This is intended for use with the
 and
 .BR \-S | \-\-since
 options.
+.TP
+.B \-x, \-\-xprt
+Display only the transport statistics
 .SS Options specific to the iostat sub-command
 .IP "\fIinterval\fP"
 Specifies the amount of time in seconds between each report.  The first report contains statistics for the time since each file system was mounted.  Each subsequent report contains statistics collected during the interval since the previous report.  This may not be used with the
tools/mountstats/mountstats.py +94 -11

184 lines not on this page · raw message