Skip to content

Commit

Permalink
tools/kvm_stat: document list of interactive commands
Browse files Browse the repository at this point in the history
Apart from the source code, there does not seem to be a place that documents
the interactive capabilities of kvm_stat yet.

Signed-off-by: Stefan Raspl <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
  • Loading branch information
Stefan Raspl authored and bonzini committed Mar 29, 2017
1 parent 184b2d2 commit 1eaa2f9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/kvm/kvm_stat/kvm_stat
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,13 @@ Requirements:
CAP_SYS_ADMIN and perf events are used.
- CAP_SYS_RESOURCE if the hard limit is not high enough to allow
the large number of files that are possibly opened.
Interactive Commands:
f filter by regular expression
p filter by PID
q quit
x toggle reporting of stats for individual child trace events
Press any other key to refresh statistics immediately.
"""

class PlainHelpFormatter(optparse.IndentedHelpFormatter):
Expand Down
16 changes: 16 additions & 0 deletions tools/kvm/kvm_stat/kvm_stat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,27 @@ state transitions such as guest mode entry and exit.
This tool is useful for observing guest behavior from the host perspective.
Often conclusions about performance or buggy behavior can be drawn from the
output.
While running in regular mode, use any of the keys listed in section
'Interactive Commands' below.
Use batch and logging modes for scripting purposes.

The set of KVM kernel module trace events may be specific to the kernel version
or architecture. It is best to check the KVM kernel module source code for the
meaning of events.

INTERACTIVE COMMANDS
--------------------
[horizontal]
*f*:: filter by regular expression

*p*:: filter by PID

*q*:: quit

*x*:: toggle reporting of stats for child trace events

Press any other key to refresh statistics immediately.

OPTIONS
-------
-1::
Expand Down

0 comments on commit 1eaa2f9

Please sign in to comment.