]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Add ability to display IOThread stats
authorJohn Ferlan <jferlan@redhat.com>
Wed, 3 Oct 2018 19:04:14 +0000 (15:04 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 19 Nov 2018 12:26:40 +0000 (07:26 -0500)
Add an --iothread qualifier to domstats and an explanation in
the man page. Describe the values in as generic terms as possible
allowing each hypervisor to provide a specific algorithm to utilize
the values as it sees fit.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain-monitor.c
tools/virsh.pod

index f0ad558f874ee7c7cf2148af7cb2883a8119c60f..06e7fec7be5e4ab5cc71b143eba7ac0ce68f6acb 100644 (file)
@@ -2067,6 +2067,10 @@ static const vshCmdOptDef opts_domstats[] = {
      .type = VSH_OT_BOOL,
      .help = N_("report domain perf event statistics"),
     },
+    {.name = "iothread",
+     .type = VSH_OT_BOOL,
+     .help = N_("report domain IOThread information"),
+    },
     {.name = "list-active",
      .type = VSH_OT_BOOL,
      .help = N_("list only active domains"),
@@ -2180,6 +2184,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
     if (vshCommandOptBool(cmd, "perf"))
         stats |= VIR_DOMAIN_STATS_PERF;
 
+    if (vshCommandOptBool(cmd, "iothread"))
+        stats |= VIR_DOMAIN_STATS_IOTHREAD;
+
     if (vshCommandOptBool(cmd, "list-active"))
         flags |= VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE;
 
index 86c041d575bb70d31538e2879cc048f68cfab39e..90f3c1ef5c1bf453091a585eeef75dabd2041619 100644 (file)
@@ -975,7 +975,8 @@ or unique source names printed by this command.
 
 =item B<domstats> [I<--raw>] [I<--enforce>] [I<--backing>] [I<--nowait>]
 [I<--state>] [I<--cpu-total>] [I<--balloon>] [I<--vcpu>] [I<--interface>]
-[I<--block>] [I<--perf>] [[I<--list-active>] [I<--list-inactive>]
+[I<--block>] [I<--perf>] [I<--iothread>]
+[[I<--list-active>] [I<--list-inactive>]
 [I<--list-persistent>] [I<--list-transient>] [I<--list-running>]
 [I<--list-paused>] [I<--list-shutoff>] [I<--list-other>]] | [I<domain> ...]
 
@@ -993,7 +994,7 @@ behavior use the I<--raw> flag.
 The individual statistics groups are selectable via specific flags. By
 default all supported statistics groups are returned. Supported
 statistics groups flags are: I<--state>, I<--cpu-total>, I<--balloon>,
-I<--vcpu>, I<--interface>, I<--block>, I<--perf>.
+I<--vcpu>, I<--interface>, I<--block>, I<--perf>, I<--iothread>.
 
 Note that - depending on the hypervisor type and version or the domain state
 - not all of the following statistics may be returned.
@@ -1126,6 +1127,27 @@ Information listed includes:
                            VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event
                            See domblkthreshold.
 
+I<--iothread> returns information about IOThreads on the running guest
+if supported by the hypervisor.
+
+The "poll-max-ns" for each thread is the maximum nanoseconds to allow
+each polling interval to occur. A polling interval is a period of time
+allowed for a thread to process data before being the guest gives up
+its CPU quantum back to the host. A value set too small will not allow
+the IOThread to run long enough on a CPU to process data. A value set
+too high will consume too much CPU time per IOThread failing to allow
+other threads running on the CPU to get time. The polling interval is
+not available for statistical purposes.
+
+ "iothread.<id>.poll-max-ns" - maximum polling time in nanoseconds used
+                               by the <id> IOThread. A value of 0 (zero)
+                               indicates polling is disabled.
+ "iothread.<id>.poll-grow" - polling time grow value. A value of 0 (zero)
+                             indicates growth is managed by the hypervisor.
+ "iothread.<id>.poll-shrink" - polling time shrink value. A value of
+                               0 (zero) indicates shrink is managed by
+                               the hypervisor.
+
 Selecting a specific statistics groups doesn't guarantee that the
 daemon supports the selected group of stats. Flag I<--enforce>
 forces the command to fail if the daemon doesn't support the