Signed-off-by: Mohamad Gebai <mgebai@suse.com>
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.
class Module(MgrModule):
COMMANDS = [
{
- "cmd": "mgr iostat",
- "desc": "Get IO rates v3",
+ "cmd": "iostat",
+ "desc": "Get IO rates",
"perm": "r",
"poll": "true"
}
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'])