mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
virsh: Introduce --nowait to domstats
This new switch can be used to set VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT flag for stats fetching API. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
0afbeb3740
commit
9486ed9071
@ -1992,6 +1992,10 @@ static const vshCmdOptDef opts_domstats[] = {
|
|||||||
.type = VSH_OT_BOOL,
|
.type = VSH_OT_BOOL,
|
||||||
.help = N_("add backing chain information to block stats"),
|
.help = N_("add backing chain information to block stats"),
|
||||||
},
|
},
|
||||||
|
{.name = "nowait",
|
||||||
|
.type = VSH_OT_BOOL,
|
||||||
|
.help = N_("report only stats that are accessible instantly"),
|
||||||
|
},
|
||||||
VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("list of domains to get stats for"), 0),
|
VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("list of domains to get stats for"), 0),
|
||||||
{.name = NULL}
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
@ -2087,6 +2091,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (vshCommandOptBool(cmd, "backing"))
|
if (vshCommandOptBool(cmd, "backing"))
|
||||||
flags |= VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING;
|
flags |= VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING;
|
||||||
|
|
||||||
|
if (vshCommandOptBool(cmd, "nowait"))
|
||||||
|
flags |= VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT;
|
||||||
|
|
||||||
if (vshCommandOptBool(cmd, "domain")) {
|
if (vshCommandOptBool(cmd, "domain")) {
|
||||||
if (VIR_ALLOC_N(domlist, 1) < 0)
|
if (VIR_ALLOC_N(domlist, 1) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -968,11 +968,11 @@ that require a block device name (such as I<domblkinfo> or
|
|||||||
I<snapshot-create> for disk snapshots) will accept either target
|
I<snapshot-create> for disk snapshots) will accept either target
|
||||||
or unique source names printed by this command.
|
or unique source names printed by this command.
|
||||||
|
|
||||||
=item B<domstats> [I<--raw>] [I<--enforce>] [I<--backing>] [I<--state>]
|
=item B<domstats> [I<--raw>] [I<--enforce>] [I<--backing>] [I<--nowait>]
|
||||||
[I<--cpu-total>] [I<--balloon>] [I<--vcpu>] [I<--interface>] [I<--block>]
|
[I<--state>] [I<--cpu-total>] [I<--balloon>] [I<--vcpu>] [I<--interface>]
|
||||||
[I<--perf>] [[I<--list-active>] [I<--list-inactive>] [I<--list-persistent>]
|
[I<--block>] [I<--perf>] [[I<--list-active>] [I<--list-inactive>]
|
||||||
[I<--list-transient>] [I<--list-running>] [I<--list-paused>]
|
[I<--list-persistent>] [I<--list-transient>] [I<--list-running>]
|
||||||
[I<--list-shutoff>] [I<--list-other>]] | [I<domain> ...]
|
[I<--list-paused>] [I<--list-shutoff>] [I<--list-other>]] | [I<domain> ...]
|
||||||
|
|
||||||
Get statistics for multiple or all domains. Without any argument this
|
Get statistics for multiple or all domains. Without any argument this
|
||||||
command prints all available statistics for all domains.
|
command prints all available statistics for all domains.
|
||||||
@ -1123,6 +1123,12 @@ daemon supports the selected group of stats. Flag I<--enforce>
|
|||||||
forces the command to fail if the daemon doesn't support the
|
forces the command to fail if the daemon doesn't support the
|
||||||
selected group.
|
selected group.
|
||||||
|
|
||||||
|
When collecting stats libvirtd may wait for some time if there's
|
||||||
|
already another job running on given domain for it to finish.
|
||||||
|
This may cause unnecessary delay in delivering stats. Using
|
||||||
|
I<--nowait> suppresses this behaviour. On the other hand
|
||||||
|
some statistics might be missing for such domain.
|
||||||
|
|
||||||
=item B<domiflist> I<domain> [I<--inactive>]
|
=item B<domiflist> I<domain> [I<--inactive>]
|
||||||
|
|
||||||
Print a table showing the brief information of all virtual interfaces
|
Print a table showing the brief information of all virtual interfaces
|
||||||
|
Loading…
Reference in New Issue
Block a user