blob: 8e0658e79eb7358781041535548f53eea20f6860 [file] [log] [blame]
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +02001kvm_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.
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010021While running in regular mode, use any of the keys listed in section
22'Interactive Commands' below.
23Use batch and logging modes for scripting purposes.
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +020024
25The set of KVM kernel module trace events may be specific to the kernel version
26or architecture. It is best to check the KVM kernel module source code for the
27meaning of events.
28
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010029INTERACTIVE COMMANDS
30--------------------
31[horizontal]
Stefan Raspl5c1954d252017-06-25 21:34:16 +020032*b*:: toggle events by guests (debugfs only, honors filters)
33
Stefan Raspl44430842017-03-10 13:40:14 +010034*c*:: clear filter
35
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010036*f*:: filter by regular expression
Stefan Raspl883d25e72019-04-21 15:26:24 +020037 :: *Note*: Child events pull in their parents, and parents' stats summarize
38 all child events, not just the filtered ones
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010039
Stefan Raspl516f1192018-02-22 12:16:27 +010040*g*:: filter by guest name/PID
Stefan Rasplf9ff1082017-03-10 13:40:13 +010041
Stefan Raspl1fdea7b2017-06-07 21:08:38 +020042*h*:: display interactive commands reference
43
Stefan Raspl6667ae82017-06-07 21:08:41 +020044*o*:: toggle sorting order (Total vs CurAvg/s)
45
Stefan Raspl516f1192018-02-22 12:16:27 +010046*p*:: filter by guest name/PID
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010047
48*q*:: quit
49
Stefan Raspl9f114a02017-03-10 13:40:15 +010050*r*:: reset stats
51
Stefan Raspleecda7a2020-03-06 12:42:44 +010052*s*:: set delay between refreshs
Stefan Raspl64eefad2017-06-07 21:08:39 +020053
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010054*x*:: toggle reporting of stats for child trace events
Stefan Rasplfff8c9e2017-12-11 12:25:23 +010055 :: *Note*: The stats for the parents summarize the respective child trace
56 events
Stefan Raspl1eaa2f92017-03-10 13:40:07 +010057
58Press any other key to refresh statistics immediately.
59
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +020060OPTIONS
61-------
62-1::
63--once::
64--batch::
65 run in batch mode for one second
66
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +020067-d::
68--debugfs::
69 retrieve statistics from debugfs
70
Stefan Raspleecda7a2020-03-06 12:42:44 +010071-f<fields>::
72--fields=<fields>::
73 fields to display (regex), "-f help" for a list of available events
74
75-g<guest>::
76--guest=<guest_name>::
77 limit statistics to one virtual machine (guest name)
78
79-h::
80--help::
81 show help message
82
Stefan Rasplab7ef192017-06-25 21:34:15 +020083-i::
84--debugfs-include-past::
85 include all available data on past events for debugfs
86
Stefan Raspleecda7a2020-03-06 12:42:44 +010087-l::
88--log::
89 run in logging mode (like vmstat)
90
Janosch Frankf0cf0402016-05-18 13:26:24 +020091-p<pid>::
92--pid=<pid>::
93 limit statistics to one virtual machine (pid)
94
Stefan Raspleecda7a2020-03-06 12:42:44 +010095-t::
96--tracepoints::
97 retrieve statistics from tracepoints
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +020098
99SEE ALSO
100--------
101'perf'(1), 'trace-cmd'(1)
102
103AUTHOR
104------
105Stefan Hajnoczi <stefanha@redhat.com>