summaryrefslogtreecommitdiffstats
path: root/tools/kvm/kvm_stat/kvm_stat
diff options
context:
space:
mode:
authorStefan Raspl <raspl@de.ibm.com>2020-03-06 12:42:44 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-23 15:44:19 -0400
commiteecda7a95646a4590ea02545d15d73cdcdf8beb1 (patch)
tree827aaa31440ee1b571bb6845f6fc2e69a6de496e /tools/kvm/kvm_stat/kvm_stat
parentbfcaa84975fa0c75deca3e997533aaa35ffed12b (diff)
downloadlinux-eecda7a95646a4590ea02545d15d73cdcdf8beb1.tar.bz2
tools/kvm_stat: rework command line sequence and message texts
Make sure command line arguments are sorted alphabetically everywhere, and adjusted existing texts for interactive command 's' to become consistent with the long form --set-delay. Throwing in some PEP8 fixes (all cosmetics) for good measure. Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Message-Id: <20200306114250.57585-2-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/kvm/kvm_stat/kvm_stat')
-rwxr-xr-xtools/kvm/kvm_stat/kvm_stat9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat
index 4cf93110c259..05638ab59b9d 100755
--- a/tools/kvm/kvm_stat/kvm_stat
+++ b/tools/kvm/kvm_stat/kvm_stat
@@ -1183,7 +1183,7 @@ class Tui(object):
if not self._is_running_guest(self.stats.pid_filter):
if self._gname:
- try: # ...to identify the guest by name in case it's back
+ try: # ...to identify the guest by name in case it's back
pids = self.get_pid_from_gname(self._gname)
if len(pids) == 1:
self._refresh_header(pids[0])
@@ -1336,8 +1336,8 @@ class Tui(object):
msg = ''
while True:
self.screen.erase()
- self.screen.addstr(0, 0, 'Set update interval (defaults to %.1fs).' %
- DELAY_DEFAULT, curses.A_BOLD)
+ self.screen.addstr(0, 0, 'Set update interval (defaults to %.1fs).'
+ % DELAY_DEFAULT, curses.A_BOLD)
self.screen.addstr(4, 0, msg)
self.screen.addstr(2, 0, 'Change delay from %.1fs to ' %
self._delay_regular)
@@ -1545,7 +1545,7 @@ Interactive Commands:
p filter by PID
q quit
r reset stats
- s set update interval
+ s set update interval (value range: 0.1-25.5 secs)
x toggle reporting of stats for individual child trace events
Press any other key to refresh statistics immediately.
""" % (PATH_DEBUGFS_KVM, PATH_DEBUGFS_TRACING)
@@ -1711,5 +1711,6 @@ def main():
else:
batch(stats)
+
if __name__ == "__main__":
main()