Paolo Bonzini | fd41b5a | 2016-05-24 10:41:15 +0200 | [diff] [blame] | 1 | kvm_stat(1) |
| 2 | =========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | kvm_stat - Report KVM kernel module event counters |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | 'kvm_stat' [OPTION]... |
| 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | kvm_stat prints counts of KVM kernel module trace events. These events signify |
| 16 | state transitions such as guest mode entry and exit. |
| 17 | |
| 18 | This tool is useful for observing guest behavior from the host perspective. |
| 19 | Often conclusions about performance or buggy behavior can be drawn from the |
| 20 | output. |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 21 | While running in regular mode, use any of the keys listed in section |
| 22 | 'Interactive Commands' below. |
| 23 | Use batch and logging modes for scripting purposes. |
Paolo Bonzini | fd41b5a | 2016-05-24 10:41:15 +0200 | [diff] [blame] | 24 | |
| 25 | The set of KVM kernel module trace events may be specific to the kernel version |
| 26 | or architecture. It is best to check the KVM kernel module source code for the |
| 27 | meaning of events. |
| 28 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 29 | INTERACTIVE COMMANDS |
| 30 | -------------------- |
| 31 | [horizontal] |
Stefan Raspl | 5c1954d25 | 2017-06-25 21:34:16 +0200 | [diff] [blame] | 32 | *b*:: toggle events by guests (debugfs only, honors filters) |
| 33 | |
Stefan Raspl | 4443084 | 2017-03-10 13:40:14 +0100 | [diff] [blame] | 34 | *c*:: clear filter |
| 35 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 36 | *f*:: filter by regular expression |
| 37 | |
Stefan Raspl | f9ff108 | 2017-03-10 13:40:13 +0100 | [diff] [blame] | 38 | *g*:: filter by guest name |
| 39 | |
Stefan Raspl | 1fdea7b | 2017-06-07 21:08:38 +0200 | [diff] [blame] | 40 | *h*:: display interactive commands reference |
| 41 | |
Stefan Raspl | 6667ae8 | 2017-06-07 21:08:41 +0200 | [diff] [blame] | 42 | *o*:: toggle sorting order (Total vs CurAvg/s) |
| 43 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 44 | *p*:: filter by PID |
| 45 | |
| 46 | *q*:: quit |
| 47 | |
Stefan Raspl | 9f114a0 | 2017-03-10 13:40:15 +0100 | [diff] [blame] | 48 | *r*:: reset stats |
| 49 | |
Stefan Raspl | 64eefad | 2017-06-07 21:08:39 +0200 | [diff] [blame] | 50 | *s*:: set update interval |
| 51 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 52 | *x*:: toggle reporting of stats for child trace events |
| 53 | |
| 54 | Press any other key to refresh statistics immediately. |
| 55 | |
Paolo Bonzini | fd41b5a | 2016-05-24 10:41:15 +0200 | [diff] [blame] | 56 | OPTIONS |
| 57 | ------- |
| 58 | -1:: |
| 59 | --once:: |
| 60 | --batch:: |
| 61 | run in batch mode for one second |
| 62 | |
| 63 | -l:: |
| 64 | --log:: |
| 65 | run in logging mode (like vmstat) |
| 66 | |
| 67 | -t:: |
| 68 | --tracepoints:: |
| 69 | retrieve statistics from tracepoints |
| 70 | |
| 71 | -d:: |
| 72 | --debugfs:: |
| 73 | retrieve statistics from debugfs |
| 74 | |
Stefan Raspl | ab7ef19 | 2017-06-25 21:34:15 +0200 | [diff] [blame] | 75 | -i:: |
| 76 | --debugfs-include-past:: |
| 77 | include all available data on past events for debugfs |
| 78 | |
Janosch Frank | f0cf040 | 2016-05-18 13:26:24 +0200 | [diff] [blame] | 79 | -p<pid>:: |
| 80 | --pid=<pid>:: |
| 81 | limit statistics to one virtual machine (pid) |
| 82 | |
Stefan Raspl | f9ff108 | 2017-03-10 13:40:13 +0100 | [diff] [blame] | 83 | -g<guest>:: |
| 84 | --guest=<guest_name>:: |
| 85 | limit statistics to one virtual machine (guest name) |
| 86 | |
Paolo Bonzini | fd41b5a | 2016-05-24 10:41:15 +0200 | [diff] [blame] | 87 | -f<fields>:: |
| 88 | --fields=<fields>:: |
| 89 | fields to display (regex) |
| 90 | |
| 91 | -h:: |
| 92 | --help:: |
| 93 | show help message |
| 94 | |
| 95 | SEE ALSO |
| 96 | -------- |
| 97 | 'perf'(1), 'trace-cmd'(1) |
| 98 | |
| 99 | AUTHOR |
| 100 | ------ |
| 101 | Stefan Hajnoczi <stefanha@redhat.com> |