diff mbox

[nfs-utils,RFC,14/15] mountstats: Remove the --start and --end options

Message ID 1415206872-864-15-git-send-email-smayhew@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Scott Mayhew Nov. 5, 2014, 5:01 p.m. UTC
All they do is throw 'not implemented' exceptions anyway.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 tools/mountstats/mountstats.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
index 389f241..f9f5eac 100755
--- a/tools/mountstats/mountstats.py
+++ b/tools/mountstats/mountstats.py
@@ -631,8 +631,6 @@  def print_mountstats_help(name):
     print('  --file <file> read stats from \'file\' instead of /proc/self/mountstats')
     print('  --nfs        display only the NFS statistics')
     print('  --rpc        display only the RPC statistics')
-    print('  --start      sample and save statistics')
-    print('  --end        resample statistics and compare them with saved')
     print('  --since <file> shows difference between current stats and those in \'file\'')
     print()
 
@@ -656,7 +654,7 @@  def mountstats_command():
     """Mountstats command
     """
     try:
-        opts, args = getopt.getopt(sys.argv[1:], "ef:hnrsvS:R", ["end", "file=", "help", "nfs", "rpc", "start", "version", "since=", "raw"])
+        opts, args = getopt.getopt(sys.argv[1:], "f:hnrvS:R", ["file=", "help", "nfs", "rpc", "version", "since=", "raw"])
     except getopt.GetoptError as err:
         print_mountstats_help(prog)
 
@@ -668,9 +666,7 @@  def mountstats_command():
     since = None
 
     for o, a in opts:
-        if o in ("-e", "--end"):
-            raise Exception('Sampling is not yet implemented')
-        elif o in ("-f", "--file"):
+        if o in ("-f", "--file"):
             infile = a
         elif o in ("-h", "--help"):
             print_mountstats_help(prog)
@@ -679,8 +675,6 @@  def mountstats_command():
             nfs_only = True
         elif o in ("-r", "--rpc"):
             rpc_only = True
-        elif o in ("-s", "--start"):
-            raise Exception('Sampling is not yet implemented')
         elif o in ("-v", "--version"):
             print('%s version %s' % (sys.argv[0], Mountstats_version))
             sys.exit(0)