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 | 4443084 | 2017-03-10 13:40:14 +0100 | [diff] [blame] | 32 | *c*:: clear filter |
| 33 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 34 | *f*:: filter by regular expression |
| 35 | |
Stefan Raspl | f9ff108 | 2017-03-10 13:40:13 +0100 | [diff] [blame] | 36 | *g*:: filter by guest name |
| 37 | |
Stefan Raspl | 1fdea7b | 2017-06-07 21:08:38 +0200 | [diff] [blame] | 38 | *h*:: display interactive commands reference |
| 39 | |
Stefan Raspl | 6667ae8 | 2017-06-07 21:08:41 +0200 | [diff] [blame] | 40 | *o*:: toggle sorting order (Total vs CurAvg/s) |
| 41 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 42 | *p*:: filter by PID |
| 43 | |
| 44 | *q*:: quit |
| 45 | |
Stefan Raspl | 9f114a0 | 2017-03-10 13:40:15 +0100 | [diff] [blame] | 46 | *r*:: reset stats |
| 47 | |
Stefan Raspl | 64eefad | 2017-06-07 21:08:39 +0200 | [diff] [blame] | 48 | *s*:: set update interval |
| 49 | |
Stefan Raspl | 1eaa2f9 | 2017-03-10 13:40:07 +0100 | [diff] [blame] | 50 | *x*:: toggle reporting of stats for child trace events |
| 51 | |
| 52 | Press any other key to refresh statistics immediately. |
| 53 | |
Paolo Bonzini | fd41b5a | 2016-05-24 10:41:15 +0200 | [diff] [blame] | 54 | OPTIONS |
| 55 | ------- |
| 56 | -1:: |
| 57 | --once:: |
| 58 | --batch:: |
| 59 | run in batch mode for one second |
| 60 | |
| 61 | -l:: |
| 62 | --log:: |
| 63 | run in logging mode (like vmstat) |
| 64 | |
| 65 | -t:: |
| 66 | --tracepoints:: |
| 67 | retrieve statistics from tracepoints |
| 68 | |
| 69 | -d:: |
| 70 | --debugfs:: |
| 71 | retrieve statistics from debugfs |
| 72 | |
Stefan Raspl | ab7ef19 | 2017-06-25 21:34:15 +0200 | [diff] [blame^] | 73 | -i:: |
| 74 | --debugfs-include-past:: |
| 75 | include all available data on past events for debugfs |
| 76 | |
Janosch Frank | f0cf040 | 2016-05-18 13:26:24 +0200 | [diff] [blame] | 77 | -p<pid>:: |
| 78 | --pid=<pid>:: |
| 79 | limit statistics to one virtual machine (pid) |
| 80 | |
Stefan Raspl | f9ff108 | 2017-03-10 13:40:13 +0100 | [diff] [blame] | 81 | -g<guest>:: |
| 82 | --guest=<guest_name>:: |
| 83 | limit statistics to one virtual machine (guest name) |
| 84 | |
Paolo Bonzini | fd41b5a | 2016-05-24 10:41:15 +0200 | [diff] [blame] | 85 | -f<fields>:: |
| 86 | --fields=<fields>:: |
| 87 | fields to display (regex) |
| 88 | |
| 89 | -h:: |
| 90 | --help:: |
| 91 | show help message |
| 92 | |
| 93 | SEE ALSO |
| 94 | -------- |
| 95 | 'perf'(1), 'trace-cmd'(1) |
| 96 | |
| 97 | AUTHOR |
| 98 | ------ |
| 99 | Stefan Hajnoczi <stefanha@redhat.com> |