From 2ef292f12dbc13c450bdac0ec48c293ce6a1a7fe Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 17 Oct 2017 19:15:34 +0200 Subject: [PATCH 29/69] tools/kvm_stat: document list of interactive commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: David Hildenbrand Message-id: <20171017191605.2378-9-david@redhat.com> Patchwork-id: 77315 O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 08/39] tools/kvm_stat: document list of interactive commands Bugzilla: 1497137 RH-Acked-by: Paolo Bonzini RH-Acked-by: Cornelia Huck RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Thomas Huth Upstream-status: linux.git 1eaa2f9022d55a8d7249c42def8dc4b0d682e142 Convertion of documentation (for man page generation) to texi. commit 1eaa2f9022d55a8d7249c42def8dc4b0d682e142 Author: Stefan Raspl Date: Fri Mar 10 13:40:07 2017 +0100 tools/kvm_stat: document list of interactive commands 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 Signed-off-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Miroslav Rezanina --- scripts/kvm/kvm_stat | 7 +++++++ scripts/kvm/kvm_stat.texi | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index 3e60d93..aca8508 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/kvm_stat @@ -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): diff --git a/scripts/kvm/kvm_stat.texi b/scripts/kvm/kvm_stat.texi index 4faf1a6..3519cf9 100644 --- a/scripts/kvm/kvm_stat.texi +++ b/scripts/kvm/kvm_stat.texi @@ -17,8 +17,32 @@ 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. +Use batch and logging modes for scripting purposes. + +@section Interactive Commands + +While running in regular (interactive) mode, use any of the following keys: + +@table @key +@item f +@kindex f +filter by regular expression +@item p +@kindex p +filter by PID +@item q +@kindex q +quit +@item x +@kindex x +toggle reporting of stats for child trace events +@end table + +Press any other key to refresh statistics immediately. + @c man end + @c man begin OPTIONS @table @option @item -1, --once, --batch -- 1.8.3.1