1*ec7588a4SRobert Mustacchi.\" 2*ec7588a4SRobert Mustacchi.\" This file and its contents are supplied under the terms of the 3*ec7588a4SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0. 4*ec7588a4SRobert Mustacchi.\" You may only use this file in accordance with the terms of version 5*ec7588a4SRobert Mustacchi.\" 1.0 of the CDDL. 6*ec7588a4SRobert Mustacchi.\" 7*ec7588a4SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this 8*ec7588a4SRobert Mustacchi.\" source. A copy of the CDDL is also available via the Internet at 9*ec7588a4SRobert Mustacchi.\" http://www.illumos.org/license/CDDL. 10*ec7588a4SRobert Mustacchi.\" 11*ec7588a4SRobert Mustacchi.\" 12*ec7588a4SRobert Mustacchi.\" Copyright (c) 2014, Joyent, Inc. 13*ec7588a4SRobert Mustacchi.\" 14*ec7588a4SRobert Mustacchi.Dd Dec 20, 2014 15*ec7588a4SRobert Mustacchi.Dt KVMSTAT 1 16*ec7588a4SRobert Mustacchi.Os 17*ec7588a4SRobert Mustacchi.Sh NAME 18*ec7588a4SRobert Mustacchi.Nm kvmstat 19*ec7588a4SRobert Mustacchi.Nd report KVM statistics 20*ec7588a4SRobert Mustacchi.Sh SYNOPSIS 21*ec7588a4SRobert Mustacchi.Nm kvmstat 22*ec7588a4SRobert Mustacchi.Oo 23*ec7588a4SRobert Mustacchi.Ar interval 24*ec7588a4SRobert Mustacchi.Op Ar count 25*ec7588a4SRobert Mustacchi.Oc 26*ec7588a4SRobert Mustacchi.Sh DESCRIPTION 27*ec7588a4SRobert Mustacchi.Nm 28*ec7588a4SRobert Mustacchireports the activity of running KVM virtual machines and their exit activity, 29*ec7588a4SRobert Mustacchiinjected interrupts, emulations, and more, on a per virtual CPU basis. 30*ec7588a4SRobert Mustacchi.Lp 31*ec7588a4SRobert Mustacchi.Nm 32*ec7588a4SRobert Mustacchishould be used when trying to get a rough sense of guest activity from the 33*ec7588a4SRobert Mustacchihypervisor's perspective, and allows one to understand from a low-level 34*ec7588a4SRobert Mustacchiperspective, what kind of activity is going on inside of the virtual machine. In 35*ec7588a4SRobert Mustacchiaddition, 36*ec7588a4SRobert Mustacchi.Nm 37*ec7588a4SRobert Mustacchiis useful for diagnosing reports of pathological or faulty behavior inside of 38*ec7588a4SRobert Mustacchiguests. While there is no expected range of values for the fields displayed as 39*ec7588a4SRobert Mustacchithat varies with the use of virtual machines, if all of the virtual CPUs for a 40*ec7588a4SRobert Mustacchigiven virtual machine are consistently zero, then that may indicate that a 41*ec7588a4SRobert Mustacchiproblem has occurred, for example, a panic inside of the guest or a bug in the 42*ec7588a4SRobert Mustacchihypervisor. 43*ec7588a4SRobert Mustacchi.Lp 44*ec7588a4SRobert MustacchiIf no operands are specified, then 45*ec7588a4SRobert Mustacchi.Nm 46*ec7588a4SRobert Mustacchiwill display statistics every second until the program is terminated. 47*ec7588a4SRobert Mustacchi.Ss Output Fields 48*ec7588a4SRobert MustacchiEvery 49*ec7588a4SRobert Mustacchi.Ar interval 50*ec7588a4SRobert Mustacchi.Nm 51*ec7588a4SRobert Mustacchiwill report data with the following fields: 52*ec7588a4SRobert Mustacchi.Bl -tag -width Ds 53*ec7588a4SRobert Mustacchi.It Nm pid 54*ec7588a4SRobert MustacchiIdentifier of the process controlling the virtual CPU. 55*ec7588a4SRobert Mustacchi.It Nm vcpu 56*ec7588a4SRobert MustacchiVirtual CPU identifier relative to its virtual machine. 57*ec7588a4SRobert Mustacchi.It Nm exits 58*ec7588a4SRobert MustacchiCount of all virtual machine exits for the virtual CPU over 59*ec7588a4SRobert Mustacchi.Ar interval . 60*ec7588a4SRobert Mustacchi.It Nm haltx 61*ec7588a4SRobert MustacchiCount of virtual machine exits due to the guest executing the 62*ec7588a4SRobert Mustacchi.Sy HLT 63*ec7588a4SRobert Mustacchiinstruction for the virtual CPU over 64*ec7588a4SRobert Mustacchi.Ar interval . 65*ec7588a4SRobert Mustacchi.It Nm irqx 66*ec7588a4SRobert MustacchiCount of virtual machine exits due to a pending external interrupt arriving 67*ec7588a4SRobert Mustacchion the physical CPU that the virtual CPU was actively running on over 68*ec7588a4SRobert Mustacchi.Ar interval . 69*ec7588a4SRobert Mustacchi.It Nm irqwx 70*ec7588a4SRobert MustacchiCount of virtual machine exits due to an open interrupt window on the 71*ec7588a4SRobert Mustacchivirtual CPU over 72*ec7588a4SRobert Mustacchi.Ar interval . 73*ec7588a4SRobert Mustacchi.It Nm iox 74*ec7588a4SRobert MustacchiCount of virtual machine exits due to the execution of an I/O instruction, 75*ec7588a4SRobert Mustacchisuch as 76*ec7588a4SRobert Mustacchi.Sy inb , 77*ec7588a4SRobert Mustacchion the virtual CPU over 78*ec7588a4SRobert Mustacchi.Ar interval . 79*ec7588a4SRobert Mustacchi.It Nm mmiox 80*ec7588a4SRobert MustacchiCount of virtual machine exits due to performing memory mapped I/O on the 81*ec7588a4SRobert Mustacchivirtual CPU over 82*ec7588a4SRobert Mustacchi.Ar interval . 83*ec7588a4SRobert Mustacchi.It Nm irqs 84*ec7588a4SRobert MustacchiCount of interrupts injected into the virtual CPU over 85*ec7588a4SRobert Mustacchi.Ar interval . 86*ec7588a4SRobert Mustacchi.It Nm emul 87*ec7588a4SRobert MustacchiCount of instructions the hypervisor had to emulate on behalf of the guest 88*ec7588a4SRobert Mustacchivirtual CPU over 89*ec7588a4SRobert Mustacchi.Ar interval . 90*ec7588a4SRobert Mustacchi.It Nm eptv 91*ec7588a4SRobert MustacchiCount of extended page table violations serviced on the virtual CPU over 92*ec7588a4SRobert Mustacchi.Ar interval . 93*ec7588a4SRobert Mustacchi.El 94*ec7588a4SRobert Mustacchi.Sh OPERANDS 95*ec7588a4SRobert MustacchiThe following operands are supported: 96*ec7588a4SRobert Mustacchi.Bl -hang -width Ds 97*ec7588a4SRobert Mustacchi.It Ar count 98*ec7588a4SRobert Mustacchi.Bd -filled -compact 99*ec7588a4SRobert MustacchiSpecifies the number of times that the statistics are repeated. If not 100*ec7588a4SRobert Mustacchispecified, 101*ec7588a4SRobert Mustacchi.Nm 102*ec7588a4SRobert Mustacchiwill continue until it is terminated. 103*ec7588a4SRobert Mustacchi.Ed 104*ec7588a4SRobert Mustacchi.It Ar interval 105*ec7588a4SRobert Mustacchi.Bd -filled -compact 106*ec7588a4SRobert MustacchiSpecifies the number of seconds between reports of statistics. If not specified, 107*ec7588a4SRobert Mustacchireports are generated every second. 108*ec7588a4SRobert Mustacchi.Ed 109*ec7588a4SRobert Mustacchi.El 110*ec7588a4SRobert Mustacchi.Sh STABILITY 111*ec7588a4SRobert MustacchiThe arguments are 112*ec7588a4SRobert Mustacchi.Sy committed , 113*ec7588a4SRobert Mustacchiwhile the output format is 114*ec7588a4SRobert Mustacchi.Sy Not an interface . 115*ec7588a4SRobert Mustacchi.Sh SEE ALSO 116*ec7588a4SRobert Mustacchi.Xr iostat 1M , 117*ec7588a4SRobert Mustacchi.Xr mpstat 1M , 118*ec7588a4SRobert Mustacchi.Xr attributes 5 119