aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-05-24 04:41:15 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2016-05-25 10:12:03 -0400
commitfd41b5a96948f67785458c04e9ddb5ef619251d5 (patch)
treeeb7b748e7f11ec14656544fed9f1fd2a386c2a92 /tools
parentf9bc9e65fbec1781f64effc6bcc3b6edc57f8d19 (diff)
tools: Add kvm_stat man page
Converted from the Texinfo source in QEMU to asciidoc. The a2x incantation was provided by Janosch Frank. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/kvm/kvm_stat/Makefile40
-rw-r--r--tools/kvm/kvm_stat/kvm_stat.txt61
2 files changed, 99 insertions, 2 deletions
diff --git a/tools/kvm/kvm_stat/Makefile b/tools/kvm/kvm_stat/Makefile
index c639b8d30688..5b1cba57e3b3 100644
--- a/tools/kvm/kvm_stat/Makefile
+++ b/tools/kvm/kvm_stat/Makefile
@@ -1,5 +1,41 @@
1include ../../scripts/Makefile.include
2include ../../scripts/utilities.mak
1BINDIR=usr/bin 3BINDIR=usr/bin
4MANDIR=usr/share/man
5MAN1DIR=$(MANDIR)/man1
2 6
3install: 7MAN1=kvm_stat.1
4 mkdir -p $(INSTALL_ROOT)/$(BINDIR) 8
9A2X=a2x
10a2x_path := $(call get-executable,$(A2X))
11
12all: man
13
14ifneq ($(findstring $(MAKEFLAGS),s),s)
15 ifneq ($(V),1)
16 QUIET_A2X = @echo ' A2X '$@;
17 endif
18endif
19
20%.1: %.txt
21ifeq ($(a2x_path),)
22 $(error "You need to install asciidoc for man pages")
23else
24 $(QUIET_A2X)$(A2X) --doctype manpage --format manpage $<
25endif
26
27clean:
28 rm -f $(MAN1)
29
30man: $(MAN1)
31
32install-man: man
33 install -d -m 755 $(INSTALL_ROOT)/$(MAN1DIR)
34 install -m 644 kvm_stat.1 $(INSTALL_ROOT)/$(MAN1DIR)
35
36install-tools:
37 install -d -m 755 $(INSTALL_ROOT)/$(BINDIR)
5 install -m 755 -p "kvm_stat" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" 38 install -m 755 -p "kvm_stat" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
39
40install: install-tools install-man
41.PHONY: all clean man install-tools install-man install
diff --git a/tools/kvm/kvm_stat/kvm_stat.txt b/tools/kvm/kvm_stat/kvm_stat.txt
new file mode 100644
index 000000000000..8dcb48aaca50
--- /dev/null
+++ b/tools/kvm/kvm_stat/kvm_stat.txt
@@ -0,0 +1,61 @@
1kvm_stat(1)
2===========
3
4NAME
5----
6kvm_stat - Report KVM kernel module event counters
7
8SYNOPSIS
9--------
10[verse]
11'kvm_stat' [OPTION]...
12
13DESCRIPTION
14-----------
15kvm_stat prints counts of KVM kernel module trace events. These events signify
16state transitions such as guest mode entry and exit.
17
18This tool is useful for observing guest behavior from the host perspective.
19Often conclusions about performance or buggy behavior can be drawn from the
20output.
21
22The set of KVM kernel module trace events may be specific to the kernel version
23or architecture. It is best to check the KVM kernel module source code for the
24meaning of events.
25
26Note that trace events are counted globally across all running guests.
27
28OPTIONS
29-------
30-1::
31--once::
32--batch::
33 run in batch mode for one second
34
35-l::
36--log::
37 run in logging mode (like vmstat)
38
39-t::
40--tracepoints::
41 retrieve statistics from tracepoints
42
43-d::
44--debugfs::
45 retrieve statistics from debugfs
46
47-f<fields>::
48--fields=<fields>::
49 fields to display (regex)
50
51-h::
52--help::
53 show help message
54
55SEE ALSO
56--------
57'perf'(1), 'trace-cmd'(1)
58
59AUTHOR
60------
61Stefan Hajnoczi <stefanha@redhat.com>