[libvirt] [PATCH 3/3] cmt: add virsh support
Jiri Denemark
jdenemar at redhat.com
Thu Oct 29 09:54:20 UTC 2015
On Thu, Oct 29, 2015 at 14:02:30 +0800, Qiaowei Ren wrote:
> This patch update domstats command to support CMT feature based on
> extended bulk stats API virDomainListGetStats.
>
> Signed-off-by: Qiaowei Ren <qiaowei.ren at intel.com>
> ---
> tools/virsh-domain-monitor.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
> index 1d4dc25..28f7bf8 100644
> --- a/tools/virsh-domain-monitor.c
> +++ b/tools/virsh-domain-monitor.c
> @@ -2013,6 +2013,10 @@ static const vshCmdOptDef opts_domstats[] = {
> .type = VSH_OT_BOOL,
> .help = N_("report domain block device statistics"),
> },
> + {.name = "cache",
> + .type = VSH_OT_BOOL,
> + .help = N_("report domain cache statistics"),
> + },
> {.name = "list-active",
> .type = VSH_OT_BOOL,
> .help = N_("list only active domains"),
> @@ -2123,6 +2127,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
> if (vshCommandOptBool(cmd, "block"))
> stats |= VIR_DOMAIN_STATS_BLOCK;
>
> + if (vshCommandOptBool(cmd, "cache"))
> + stats |= VIR_DOMAIN_STATS_CACHE;
> +
> if (vshCommandOptBool(cmd, "list-active"))
> flags |= VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE;
You need to document the option in virsh manpage.
Jirka
More information about the libvir-list
mailing list