Skip to contentSkip to conversation

mountstats: Add option to pretty-print xprt statistics

RFC PATCH Superseded Chuck Lever 1 participant 1 message Dec 1, 2017

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH v2 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 v1:
- Use %d when displaying numeric values
- The number of items in words[] can be less than the number of keys in XprtRdmaCounters on older kernels, need to tolerate that

---
 tools/mountstats/mountstats.man |    5 ++
 tools/mountstats/mountstats.py  |   98 ++++++++++++++++++++++++++++++++++++---
 2 files changed, 95 insertions(+), 8 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 +90 -8

159 lines not on this page · raw message