From: Mohamad Gebai Date: Wed, 28 Feb 2018 23:21:48 +0000 (-0500) Subject: mgr/iostat: update iostat to use the 'poll' flag X-Git-Tag: v13.1.0~254^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2abfb52fe7abcc70d3b4bea4649fd7d5cb3db186;p=ceph.git mgr/iostat: update iostat to use the 'poll' flag Signed-off-by: Mohamad Gebai --- diff --git a/src/ceph.in b/src/ceph.in index 9bc8a1fcef44..45b854f88d93 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1080,16 +1080,6 @@ def main(): print('error handling command target: {0}'.format(e), file=sys.stderr) return 1 - # ceph iostat - if len(childargs) > 0 and childargs[0] == 'iostat': - def call_iostat(): - while 1: - subprocess.call([sys.argv[0], 'mgr', 'iostat']) - sleep(1) - - run_in_thread(call_iostat) - return 1 - # Repulsive hack to handle tell: lop off 'tell' and target # and validate the rest of the command. 'target' is already # determined in our callers, so it's ok to remove it here. diff --git a/src/pybind/mgr/iostat/module.py b/src/pybind/mgr/iostat/module.py index bb0de7183aea..470ba83525c9 100644 --- a/src/pybind/mgr/iostat/module.py +++ b/src/pybind/mgr/iostat/module.py @@ -5,8 +5,8 @@ from mgr_module import MgrModule class Module(MgrModule): COMMANDS = [ { - "cmd": "mgr iostat", - "desc": "Get IO rates v3", + "cmd": "iostat", + "desc": "Get IO rates", "perm": "r", "poll": "true" } @@ -22,7 +22,7 @@ class Module(MgrModule): wr = 0 ops = 0 - if command['prefix'] == 'mgr iostat': + if command['prefix'] == 'iostat': r = self.get('io_rate') stamp_delta = float(r['pg_stats_delta']['stamp_delta'])