Re: [libvirt] [PATCH 8/8] virsh: extend domstats command

2016-01-28 Thread Daniel P. Berrange
On Thu, Dec 10, 2015 at 08:34:38PM +0800, Qiaowei Ren wrote:
> This patch extend domstats command to match extended
> virDomainListGetStats API in previous patch.
> 
> Signed-off-by: Qiaowei Ren 
> ---
>  tools/virsh-domain-monitor.c | 7 +++
>  tools/virsh.pod  | 7 +--
>  2 files changed, 12 insertions(+), 2 deletions(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 8/8] virsh: extend domstats command

2015-12-13 Thread Qiaowei Ren
This patch extend domstats command to match extended
virDomainListGetStats API in previous patch.

Signed-off-by: Qiaowei Ren 
---
 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 7dcf833..645936c 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -2017,6 +2017,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"),
@@ -2128,6 +2132,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 bfc7e63..89c5405 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -846,7 +846,7 @@ or unique source names printed by this command.
 
 =item B [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<--perf>] [[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 ...]
 
@@ -864,7 +864,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<--vcpu>, I<--interface>, I<--block>, I<--perf>.
 
 When selecting the I<--state> group the following fields are returned:
 "state.state" - state of the VM, returned as number from virDomainState enum,
@@ -899,6 +899,9 @@ I<--interface> returns:
 "net..tx.errs" - number of transmission errors,
 "net..tx.drop" - number of transmit packets dropped
 
+I<--perf> returns the statistics of all enabled perf events:
+"perf.cache" - the cache usage in Byte currently used
+
 I<--block> returns information about disks associated with each
 domain.  Using the I<--backing> flag extends this information to
 cover all resources in the backing chain, rather than the default
-- 
1.9.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list