162306a36Sopenharmony_cikvm_stat(1)
262306a36Sopenharmony_ci===========
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciNAME
562306a36Sopenharmony_ci----
662306a36Sopenharmony_cikvm_stat - Report KVM kernel module event counters
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciSYNOPSIS
962306a36Sopenharmony_ci--------
1062306a36Sopenharmony_ci[verse]
1162306a36Sopenharmony_ci'kvm_stat' [OPTION]...
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciDESCRIPTION
1462306a36Sopenharmony_ci-----------
1562306a36Sopenharmony_cikvm_stat prints counts of KVM kernel module trace events.  These events signify
1662306a36Sopenharmony_cistate transitions such as guest mode entry and exit.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciThis tool is useful for observing guest behavior from the host perspective.
1962306a36Sopenharmony_ciOften conclusions about performance or buggy behavior can be drawn from the
2062306a36Sopenharmony_cioutput.
2162306a36Sopenharmony_ciWhile running in regular mode, use any of the keys listed in section
2262306a36Sopenharmony_ci'Interactive Commands' below.
2362306a36Sopenharmony_ciUse batch and logging modes for scripting purposes.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciThe set of KVM kernel module trace events may be specific to the kernel version
2662306a36Sopenharmony_cior architecture.  It is best to check the KVM kernel module source code for the
2762306a36Sopenharmony_cimeaning of events.
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciINTERACTIVE COMMANDS
3062306a36Sopenharmony_ci--------------------
3162306a36Sopenharmony_ci[horizontal]
3262306a36Sopenharmony_ci*b*::	toggle events by guests (debugfs only, honors filters)
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci*c*::	clear filter
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci*f*::	filter by regular expression
3762306a36Sopenharmony_ci ::     *Note*: Child events pull in their parents, and parents' stats summarize
3862306a36Sopenharmony_ci                all child events, not just the filtered ones
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci*g*::	filter by guest name/PID
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci*h*::	display interactive commands reference
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci*o*::   toggle sorting order (Total vs CurAvg/s)
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci*p*::	filter by guest name/PID
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci*q*::	quit
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci*r*::	reset stats
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci*s*::   set delay between refreshs
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci*x*::	toggle reporting of stats for child trace events
5562306a36Sopenharmony_ci ::     *Note*: The stats for the parents summarize the respective child trace
5662306a36Sopenharmony_ci                events
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ciPress any other key to refresh statistics immediately.
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciOPTIONS
6162306a36Sopenharmony_ci-------
6262306a36Sopenharmony_ci-1::
6362306a36Sopenharmony_ci--once::
6462306a36Sopenharmony_ci--batch::
6562306a36Sopenharmony_ci	run in batch mode for one second
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci-c::
6862306a36Sopenharmony_ci--csv::
6962306a36Sopenharmony_ci        log in csv format. Requires option -l/--log or -L/--log-to-file.
7062306a36Sopenharmony_ci        When used with option -L/--log-to-file, the header is only ever
7162306a36Sopenharmony_ci        written to start of file to preserve the format.
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci-d::
7462306a36Sopenharmony_ci--debugfs::
7562306a36Sopenharmony_ci	retrieve statistics from debugfs
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci-f<fields>::
7862306a36Sopenharmony_ci--fields=<fields>::
7962306a36Sopenharmony_ci        fields to display (regex), "-f help" for a list of available events
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci-g<guest>::
8262306a36Sopenharmony_ci--guest=<guest_name>::
8362306a36Sopenharmony_ci        limit statistics to one virtual machine (guest name)
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci-h::
8662306a36Sopenharmony_ci--help::
8762306a36Sopenharmony_ci        show help message
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci-i::
9062306a36Sopenharmony_ci--debugfs-include-past::
9162306a36Sopenharmony_ci	include all available data on past events for debugfs
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci-l::
9462306a36Sopenharmony_ci--log::
9562306a36Sopenharmony_ci        run in logging mode (like vmstat)
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci-L<file>::
9962306a36Sopenharmony_ci--log-to-file=<file>::
10062306a36Sopenharmony_ci        like -l/--log, but logging to a file. Appends to existing files.
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci-p<pid>::
10362306a36Sopenharmony_ci--pid=<pid>::
10462306a36Sopenharmony_ci	limit statistics to one virtual machine (pid)
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci-s::
10762306a36Sopenharmony_ci--set-delay::
10862306a36Sopenharmony_ci        set delay between refreshs (value range: 0.1-25.5 secs)
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci-t::
11162306a36Sopenharmony_ci--tracepoints::
11262306a36Sopenharmony_ci        retrieve statistics from tracepoints
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci-z::
11562306a36Sopenharmony_ci--skip-zero-records::
11662306a36Sopenharmony_ci        omit records with all zeros in logging mode
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ciSEE ALSO
11962306a36Sopenharmony_ci--------
12062306a36Sopenharmony_ci'perf'(1), 'trace-cmd'(1)
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ciAUTHOR
12362306a36Sopenharmony_ci------
12462306a36Sopenharmony_ciStefan Hajnoczi <stefanha@redhat.com>
125