mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: extend domstats command
This patch extend domstats command to match extended virDomainListGetStats API in previous patch. Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com> Message-id: 1459171833-26416-9-git-send-email-qiaowei.ren@intel.com
This commit is contained in:
committed by
Daniel P. Berrange
parent
608e9e8802
commit
7d3b10a9fb
@@ -1963,6 +1963,10 @@ static const vshCmdOptDef opts_domstats[] = {
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("report domain block device statistics"),
|
||||
},
|
||||
{.name = "perf",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("report domain perf event statistics"),
|
||||
},
|
||||
{.name = "list-active",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("list only active domains"),
|
||||
@@ -2074,6 +2078,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
|
||||
if (vshCommandOptBool(cmd, "block"))
|
||||
stats |= VIR_DOMAIN_STATS_BLOCK;
|
||||
|
||||
if (vshCommandOptBool(cmd, "perf"))
|
||||
stats |= VIR_DOMAIN_STATS_PERF;
|
||||
|
||||
if (vshCommandOptBool(cmd, "list-active"))
|
||||
flags |= VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user