{"id":161453,"date":"2026-03-16T18:51:22","date_gmt":"2026-03-16T15:51:22","guid":{"rendered":"https:\/\/cloudspinx.com\/?p=88433"},"modified":"2026-03-16T18:51:22","modified_gmt":"2026-03-16T15:51:22","slug":"using-kvm-virt-top-top-command-for-vms","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/using-kvm-virt-top-top-command-for-vms\/","title":{"rendered":"Using KVM virt-top &#8211; top command for VMs"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/linux.die.net\/man\/1\/virt-top\" target=\"_blank\" rel=\"noreferrer noopener\">virt-top<\/a> displays real-time performance metrics and supports user interaction. The data available can be exported for further analysis.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-virt-top\">Installing virt-top<\/h3>\n\n\n\n<p>On <strong>RHEL-Based<\/strong> Distributions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install epel-release -y\n\nsudo dnf install virt-top -y<\/code><\/pre>\n\n\n\n<p>On <strong>Debian-Based<\/strong> Distributions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\n\nsudo apt install virt-top -y<\/code><\/pre>\n\n\n\n<p>Verify installation by checking the software version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>virt-top --version<\/code><\/pre>\n\n\n\n<p>Launching <code>virt-top<\/code> requires sufficient privileges to access libvirt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo virt-top<\/code><\/pre>\n\n\n\n<p>By default it connects to the default hypervisor (<code>qemu:\/\/\/system<\/code>) unless specified.<\/p>\n\n\n\n<p>To monitor VMs on a remote host, specify by connection URI:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo virt-top -c qemu+ssh:\/\/<strong>user<\/strong>@<strong>remote-host<\/strong>\/system<\/code><\/pre>\n\n\n\n<p>Here is an output from <code>virt-top<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>virt-top 22:43:42 - x86_64 12\/12CPU 3000MHz 64015MB\n\n4 domains, 4 active, 4 running, 0 sleeping, 0 paused, 0 inactive D:0 O:0 X:0\n\nCPU: 12.4% Mem: 65536 MB (65536 MB by guests)\n\nID S RDRQ WRRQ RXBY TXBY %CPU %MEM TIME NAME\n\n20 R 1901 134 503K 1M 10.5 51.0 877:32:13 dbmaster01\n\n19 R 0 3 887K 1M 1.6 25.0 414:30:50 app-server01\n\n3 R 0 7 36K 46K 0.2 12.0 286:56:27 vpn-server01\n\n4 R 0 0 36K 43K 0.2 12.0 232:24:59 radius01<\/code><\/pre>\n\n\n\n<p>Key information from the ouptut are;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Header<\/strong>: Shows general system metrics, including host CPU, memory, and the number of VMs.<\/li>\n\n\n\n<li><strong>Columns<\/strong>:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Column<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>ID<\/strong><\/td><td>The ID assigned to the VM by the hypervisor.<\/td><\/tr><tr><td><strong>S<\/strong><\/td><td>The state of the VM (<code>R<\/code> = Running, <code>S<\/code> = Sleeping, <code>P<\/code> = Paused).<\/td><\/tr><tr><td><strong>RDRQ<\/strong><\/td><td>The number of read requests issued by the VM.<\/td><\/tr><tr><td><strong>WRRQ<\/strong><\/td><td>The number of write requests issued by the VM.<\/td><\/tr><tr><td><strong>RXBY<\/strong><\/td><td>Network bytes received (e.g., 503K = 503 KB).<\/td><\/tr><tr><td><strong>TXBY<\/strong><\/td><td>Network bytes transmitted (e.g., 1M = 1 MB).<\/td><\/tr><tr><td><strong>%CPU<\/strong><\/td><td>Percentage of host CPU used by the VM.<\/td><\/tr><tr><td><strong>%MEM<\/strong><\/td><td>Percentage of host memory used by the VM.<\/td><\/tr><tr><td><strong>TIME<\/strong><\/td><td>Total CPU time used by the VM (HH:MM:SS format).<\/td><\/tr><tr><td><strong>NAME<\/strong><\/td><td>Name of the VM.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Filter to display specific VMs by name or ID:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo virt-top --domain<\/code><\/pre>\n\n\n\n<p>Run <code>virt-top<\/code> for one minute and save output in csv file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo virt-top --csv report.csv --end-time +60<\/code><\/pre>\n\n\n\n<p>For more usage example run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>virt-top --help<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The virt-top displays real-time performance metrics and supports user interaction. The data available can be exported for further analysis. Installing virt-top On RHEL-Based Distributions: On Debian-Based Distributions: Verify installation by checking the software version: Launching virt-top requires sufficient privileges to access libvirt. By default it connects to the default hypervisor (qemu:\/\/\/system) unless specified. To monitor &#8230; <a title=\"Using KVM virt-top &#8211; top command for VMs\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/using-kvm-virt-top-top-command-for-vms\/\" aria-label=\"Read more about Using KVM virt-top &#8211; top command for VMs\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":161773,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,45,86],"tags":[],"class_list":["post-161453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-kvm","category-virtualization"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/161453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=161453"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/161453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/161773"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=161453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=161453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=161453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}