KVM_STAT(1)

πŸ’… KVM_STAT(1) β€” the manual, but make it group chat

okay bestie, so this is kvm_stat, a page from the KVM_STAT(1) manual, and I'm about to tell you everything about it. no cap, every single flag. let's go πŸŽ€

✨ NAME ✨

kvm_stat β€” reports KVM kernel module event counters. that's it, that's the whole job, and it does it beautifully. πŸ’–

🌸 SYNOPSIS 🌸

kvm_stat [OPTION]...

πŸ¦‹ DESCRIPTION πŸ¦‹

so kvm_stat prints counts of KVM kernel module trace events. these events are literally the receipts of state transitions β€” things like guest mode entry and exit. πŸ‘‘

this tool is genuinely iconic for observing guest behavior from the host perspective. like, you're on the outside looking in, and ngl, a lot of conclusions about performance or buggy behavior can be drawn from the output. while you're running in regular mode, just press any of the keys listed in the Interactive Commands section below. and if you're scripting? use batch and logging modes, bestie. 🫢

heads up: the set of KVM kernel module trace events may be specific to your kernel version or architecture. it's best to check the KVM kernel module source code for the meaning of events. iykyk β€” the manpage can't do everything for you. πŸ’€

πŸŽ€ INTERACTIVE COMMANDS πŸŽ€

  • b β€” toggle events by guests (debugfs only, honors filters)
  • c β€” clear filter
  • f β€” filter by regular expression
Note: Child events pull in their parents, and parents' stats summarize all child events, not just the filtered ones. so like, don't be surprised, okay?
  • g β€” filter by guest name/PID
  • h β€” display interactive commands reference
  • o β€” toggle sorting order (Total vs CurAvg/s)
  • p β€” filter by guest name/PID
  • q β€” quit
  • r β€” reset stats
  • s β€” set delay between refreshs
  • x β€” toggle reporting of stats for child trace events
Note: The stats for the parents summarize the respective child trace events

press any other key to refresh statistics immediately. yes, any other key. it's giving "surprise me." 😭


πŸ”₯ OPTIONS πŸ”₯

  • -1, --once, --batch β€” run in batch mode for one second
  • -c, --csv β€” log in csv format. requires option -l/--log or -L/--log-to-file. when used with option -L/--log-to-file, the header is only ever written to start of file to preserve the format. (iconic restraint, honestly πŸ’…)
  • -d, --debugfs β€” retrieve statistics from debugfs
  • -f<fields>, --fields=<fields> β€” fields to display (regex), -f help for a list of available events
  • -g<guest>, --guest=<guest_name> β€” limit statistics to one virtual machine (guest name)
  • -h, --help β€” show help message
  • -i, --debugfs-include-past β€” include all available data on past events for debugfs
  • -l, --log β€” run in logging mode (like vmstat)
  • -L<file>, --log-to-file=<file> β€” like -l/--log, but logging to a file. appends to existing files. (no clobbering, we respect the data 🫢)
  • -p<pid>, --pid=<pid> β€” limit statistics to one virtual machine (pid)
  • -s, --set-delay β€” set delay between refreshs (value range: 0.1-25.5 secs)
  • -t, --tracepoints β€” retrieve statistics from tracepoints
  • -z, --skip-zero-records β€” omit records with all zeros in logging mode

🌈 SEE ALSO 🌈

perf(1), trace-cmd(1) β€” your other besties, go say hi πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Stefan Hajnoczi <stefanha@redhat.com> β€” the main character who wrote this. respect. πŸ™ˆ


and that's the whole page, bestie! πŸ¦‹ this was KVM_STAT(1), version KVM_STAT(1), dated 11/01/2026. bookmark it, screenshot it, send it to the group chat β€” it ate and left no crumbs. βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from
  • fedora 43: kernel-tools 7.2.15-100.fc43 Β· ((GPL-2.0-only WITH Linux-syscall-note) OR CDDL-1.0) AND ((GPL-2.0-only WITH Linux-syscall-note) OR Linux-OpenIB) AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Clear AND CC0-1.0 AND GFDL-1.1-no-invariants-or-later AND GPL-1.0-or-later AND (GPL-1.0-or-later WITH Linux-syscall-note) AND GPL-2.0-only AND (GPL-2.0-only OR CDDL-1.0) AND (GPL-2.0-only OR GFDL-1.2-no-invariants-only) AND (GPL-2.0-only OR GFDL-1.2-no-invariants-or-later) AND (GPL-2.0-only WITH Linux-syscall-note) AND GPL-2.0-or-later AND (GPL-2.0-or-later OR CC-BY-4.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH Linux-syscall-note) AND ISC AND LGPL-2.0-or-later AND (LGPL-2.0-or-later WITH Linux-syscall-note) AND LGPL-2.1-only AND (LGPL-2.1-only WITH Linux-syscall-note) AND LGPL-2.1-or-later AND (LGPL-2.1-or-later WITH Linux-syscall-note) AND (Linux-OpenIB OR GPL-2.0-only) AND (Linux-OpenIB OR GPL-2.0-only OR BSD-2-Clause) AND Linux-man-pages-copyleft AND MIT AND (MPL-1.1 OR GPL-2.0-only) AND (X11 OR GPL-2.0-only) AND (X11 OR GPL-2.0-or-later) AND Zlib AND (copyleft-next-0.3.1 OR GPL-2.0-or-later)
  • fedora 44: kernel-tools 7.2.15-200.fc44 Β· ((GPL-2.0-only WITH Linux-syscall-note) OR CDDL-1.0) AND ((GPL-2.0-only WITH Linux-syscall-note) OR Linux-OpenIB) AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Clear AND CC0-1.0 AND GFDL-1.1-no-invariants-or-later AND GPL-1.0-or-later AND (GPL-1.0-or-later WITH Linux-syscall-note) AND GPL-2.0-only AND (GPL-2.0-only OR CDDL-1.0) AND (GPL-2.0-only OR GFDL-1.2-no-invariants-only) AND (GPL-2.0-only OR GFDL-1.2-no-invariants-or-later) AND (GPL-2.0-only WITH Linux-syscall-note) AND GPL-2.0-or-later AND (GPL-2.0-or-later OR CC-BY-4.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH Linux-syscall-note) AND ISC AND LGPL-2.0-or-later AND (LGPL-2.0-or-later WITH Linux-syscall-note) AND LGPL-2.1-only AND (LGPL-2.1-only WITH Linux-syscall-note) AND LGPL-2.1-or-later AND (LGPL-2.1-or-later WITH Linux-syscall-note) AND (Linux-OpenIB OR GPL-2.0-only) AND (Linux-OpenIB OR GPL-2.0-only OR BSD-2-Clause) AND Linux-man-pages-copyleft AND MIT AND (MPL-1.1 OR GPL-2.0-only) AND (X11 OR GPL-2.0-only) AND (X11 OR GPL-2.0-or-later) AND Zlib AND (copyleft-next-0.3.1 OR GPL-2.0-or-later)
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms