Commit eecda7a9 authored by Stefan Raspl's avatar Stefan Raspl Committed by Paolo Bonzini

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: default avatarStefan Raspl <raspl@linux.ibm.com>
Message-Id: <20200306114250.57585-2-raspl@linux.ibm.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent bfcaa849
...@@ -1336,8 +1336,8 @@ class Tui(object): ...@@ -1336,8 +1336,8 @@ class Tui(object):
msg = '' msg = ''
while True: while True:
self.screen.erase() self.screen.erase()
self.screen.addstr(0, 0, 'Set update interval (defaults to %.1fs).' % self.screen.addstr(0, 0, 'Set update interval (defaults to %.1fs).'
DELAY_DEFAULT, curses.A_BOLD) % DELAY_DEFAULT, curses.A_BOLD)
self.screen.addstr(4, 0, msg) self.screen.addstr(4, 0, msg)
self.screen.addstr(2, 0, 'Change delay from %.1fs to ' % self.screen.addstr(2, 0, 'Change delay from %.1fs to ' %
self._delay_regular) self._delay_regular)
...@@ -1545,7 +1545,7 @@ Interactive Commands: ...@@ -1545,7 +1545,7 @@ Interactive Commands:
p filter by PID p filter by PID
q quit q quit
r reset stats 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 x toggle reporting of stats for individual child trace events
Press any other key to refresh statistics immediately. Press any other key to refresh statistics immediately.
""" % (PATH_DEBUGFS_KVM, PATH_DEBUGFS_TRACING) """ % (PATH_DEBUGFS_KVM, PATH_DEBUGFS_TRACING)
...@@ -1711,5 +1711,6 @@ def main(): ...@@ -1711,5 +1711,6 @@ def main():
else: else:
batch(stats) batch(stats)
if __name__ == "__main__": if __name__ == "__main__":
main() main()
...@@ -49,7 +49,7 @@ INTERACTIVE COMMANDS ...@@ -49,7 +49,7 @@ INTERACTIVE COMMANDS
*r*:: reset stats *r*:: reset stats
*s*:: set update interval *s*:: set delay between refreshs
*x*:: toggle reporting of stats for child trace events *x*:: toggle reporting of stats for child trace events
:: *Note*: The stats for the parents summarize the respective child trace :: *Note*: The stats for the parents summarize the respective child trace
...@@ -64,38 +64,38 @@ OPTIONS ...@@ -64,38 +64,38 @@ OPTIONS
--batch:: --batch::
run in batch mode for one second run in batch mode for one second
-l::
--log::
run in logging mode (like vmstat)
-t::
--tracepoints::
retrieve statistics from tracepoints
-d:: -d::
--debugfs:: --debugfs::
retrieve statistics from debugfs retrieve statistics from debugfs
-i:: -f<fields>::
--debugfs-include-past:: --fields=<fields>::
include all available data on past events for debugfs fields to display (regex), "-f help" for a list of available events
-p<pid>::
--pid=<pid>::
limit statistics to one virtual machine (pid)
-g<guest>:: -g<guest>::
--guest=<guest_name>:: --guest=<guest_name>::
limit statistics to one virtual machine (guest name) limit statistics to one virtual machine (guest name)
-f<fields>::
--fields=<fields>::
fields to display (regex), "-f help" for a list of available events
-h:: -h::
--help:: --help::
show help message show help message
-i::
--debugfs-include-past::
include all available data on past events for debugfs
-l::
--log::
run in logging mode (like vmstat)
-p<pid>::
--pid=<pid>::
limit statistics to one virtual machine (pid)
-t::
--tracepoints::
retrieve statistics from tracepoints
SEE ALSO SEE ALSO
-------- --------
'perf'(1), 'trace-cmd'(1) 'perf'(1), 'trace-cmd'(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment