1KVM_STAT(1)                                                        KVM_STAT(1)
2
3
4

NAME

6       kvm_stat - Report KVM kernel module event counters
7

SYNOPSIS

9       kvm_stat [OPTION]...
10

DESCRIPTION

12       kvm_stat prints counts of KVM kernel module trace events. These events
13       signify state transitions such as guest mode entry and exit.
14
15       This tool is useful for observing guest behavior from the host
16       perspective. Often conclusions about performance or buggy behavior can
17       be drawn from the output. While running in regular mode, use any of the
18       keys listed in section Interactive Commands below. Use batch and
19       logging modes for scripting purposes.
20
21       The set of KVM kernel module trace events may be specific to the kernel
22       version or architecture. It is best to check the KVM kernel module
23       source code for the meaning of events.
24

INTERACTIVE COMMANDS

26       b   toggle events by guests
27           (debugfs only, honors
28           filters)
29
30       c   clear filter
31
32       f   filter by regular
33           expression
34
35           Note: Child events pull in
36           their parents, and
37           parents' stats summarize
38           all child events, not just
39           the filtered ones
40
41       g   filter by guest name/PID
42
43       h   display interactive
44           commands reference
45
46       o   toggle sorting order
47           (Total vs CurAvg/s)
48
49       p   filter by guest name/PID
50
51       q   quit
52
53       r   reset stats
54
55       s   set delay between refreshs
56
57       x   toggle reporting of stats
58           for child trace events
59
60           Note: The stats for the
61           parents summarize the
62           respective child trace
63           events
64
65
66       Press any other key to refresh statistics immediately.
67

OPTIONS

69       -1, --once, --batch
70           run in batch mode for one second
71
72       -c, --csv
73           log in csv format. Requires option -l/--log or -L/--log-to-file.
74           When used with option -L/--log-to-file, the header is only ever
75           written to start of file to preserve the format.
76
77       -d, --debugfs
78           retrieve statistics from debugfs
79
80       -f<fields>, --fields=<fields>
81           fields to display (regex), "-f help" for a list of available events
82
83       -g<guest>, --guest=<guest_name>
84           limit statistics to one virtual machine (guest name)
85
86       -h, --help
87           show help message
88
89       -i, --debugfs-include-past
90           include all available data on past events for debugfs
91
92       -l, --log
93           run in logging mode (like vmstat)
94
95       -L<file>, --log-to-file=<file>
96           like -l/--log, but logging to a file. Appends to existing files.
97
98       -p<pid>, --pid=<pid>
99           limit statistics to one virtual machine (pid)
100
101       -s, --set-delay
102           set delay between refreshs (value range: 0.1-25.5 secs)
103
104       -t, --tracepoints
105           retrieve statistics from tracepoints
106
107       -z, --skip-zero-records
108           omit records with all zeros in logging mode
109

SEE ALSO

111       perf(1), trace-cmd(1)
112

AUTHOR

114       Stefan Hajnoczi <stefanha@redhat.com>
115
116
117
118                                  11/28/2023                       KVM_STAT(1)
Impressum