On Tue, Nov 17, 2015 at 16:00:47 +0800, Qiaowei Ren wrote: > This patch extend domstats command to match extended > virDomainListGetStats API in previous patch. > > Signed-off-by: Qiaowei Ren <qiaowei.ren@xxxxxxxxx> > --- > tools/virsh-domain-monitor.c | 7 +++++++ > tools/virsh.pod | 7 +++++-- > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c > index d4e500b..33df079 100644 > --- a/tools/virsh-domain-monitor.c > +++ b/tools/virsh-domain-monitor.c > @@ -2016,6 +2016,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"), > @@ -2127,6 +2131,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; > > diff --git a/tools/virsh.pod b/tools/virsh.pod > index 21ae4a3..935d017 100644 > --- a/tools/virsh.pod > +++ b/tools/virsh.pod > @@ -845,8 +845,8 @@ I<snapshot-create> for disk snapshots) will accept either target > or unique source names printed by this command. > > =item B<domstats> [I<--raw>] [I<--enforce>] [I<--backing>] [I<--state>] > -[I<--cpu-total>] [I<--balloon>] [I<--vcpu>] [I<--interface>] [I<--block>] > -[[I<--list-active>] [I<--list-inactive>] [I<--list-persistent>] > +[I<--cpu-total>] [I<--balloon>] [I<--vcpu>] [I<--interface>] [I<--perf>] > +[I<--block>] [[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> ...] > > @@ -899,6 +899,9 @@ I<--interface> returns: > "net.<num>.tx.errs" - number of transmission errors, > "net.<num>.tx.drop" - number of transmit packets dropped > > +I<--perf> returns: > +"perf.cache" - the cache usage in Byte currently used I think this feature would deserve to be documented a bit more. It would be nice to provide more details about what perf events are. And there are a lot of caches so describing what cache usage is measured by perf.cache would be useful too. Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list