Blame SOURCES/ps_mem-ennobling-the-s-switch.patch

73aa63
From 0736aab9093ae3043f8e2b11ecc23924ac2b7e01 Mon Sep 17 00:00:00 2001
73aa63
From: Jaromir Capik <jcapik@redhat.com>
73aa63
Date: Mon, 12 Aug 2013 14:48:03 +0200
73aa63
Subject: [PATCH] ps_mem.py: Ennobling the -s switch
73aa63
73aa63
Previously the longopt variant of the -s switch
73aa63
didn't make much sense. This commit changes the
73aa63
--split-args switch to the --show-cmdline switch
73aa63
and adds the switch in the help/usage message
73aa63
since it was completely missing there.
73aa63
---
73aa63
 scripts/ps_mem.py | 7 ++++---
73aa63
 1 file changed, 4 insertions(+), 3 deletions(-)
73aa63
73aa63
diff --git a/scripts/ps_mem.py b/scripts/ps_mem.py
73aa63
index 92be618..b30dc30 100755
73aa63
--- a/scripts/ps_mem
73aa63
+++ b/scripts/ps_mem
73aa63
@@ -139,7 +139,7 @@ proc = Proc()
73aa63
 
73aa63
 def parse_options():
73aa63
     try:
73aa63
-        long_options = ['split-args', 'help']
73aa63
+        long_options = ['show-cmdline', 'help']
73aa63
         opts, args = getopt.getopt(sys.argv[1:], "shp:w:", long_options)
73aa63
     except getopt.GetoptError:
73aa63
         sys.stderr.write(help())
73aa63
@@ -151,7 +151,7 @@ def parse_options():
73aa63
     watch = None
73aa63
 
73aa63
     for o, a in opts:
73aa63
-        if o in ('-s', '--split-args'):
73aa63
+        if o in ('-s', '--show-cmdline'):
73aa63
             split_args = True
73aa63
         if o in ('-h', '--help'):
73aa63
             sys.stdout.write(help())
73aa63
@@ -176,7 +176,8 @@ def help():
73aa63
     '\n'\
73aa63
     '-h                                 Show this help\n'\
73aa63
     '-w <N>                             Measure and show process memory every N seconds\n'\
73aa63
-    '-p <pid>[,pid2,...pidN]            Only show memory usage PIDs in the specified list\n'
73aa63
+    '-p <pid>[,pid2,...pidN]            Only show memory usage PIDs in the specified list\n' \
73aa63
+    '-s, --show-cmdline                 Show complete program path with options\n'
73aa63
 
73aa63
     return help_msg
73aa63
 
73aa63
-- 
73aa63
1.8.3.1
73aa63