blob: c057ba52364e0fffe22a50cc1e1f4fd2c4ec16f9 [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 Raspl64eefad2017-06-07 21:08:39 +020052*s*:: set update interval
53
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
67-l::
68--log::
69 run in logging mode (like vmstat)
70
71-t::
72--tracepoints::
73 retrieve statistics from tracepoints
74
75-d::
76--debugfs::
77 retrieve statistics from debugfs
78
Stefan Rasplab7ef192017-06-25 21:34:15 +020079-i::
80--debugfs-include-past::
81 include all available data on past events for debugfs
82
Janosch Frankf0cf0402016-05-18 13:26:24 +020083-p<pid>::
84--pid=<pid>::
85 limit statistics to one virtual machine (pid)
86
Stefan Rasplf9ff1082017-03-10 13:40:13 +010087-g<guest>::
88--guest=<guest_name>::
89 limit statistics to one virtual machine (guest name)
90
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +020091-f<fields>::
92--fields=<fields>::
Stefan Rasplf3d11b02017-12-11 12:25:24 +010093 fields to display (regex), "-f help" for a list of available events
Paolo Bonzinifd41b5a2016-05-24 10:41:15 +020094
95-h::
96--help::
97 show help message
98
99SEE ALSO
100--------
101'perf'(1), 'trace-cmd'(1)
102
103AUTHOR
104------
105Stefan Hajnoczi <stefanha@redhat.com>