aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2012-05-09 16:41:37 +0800
committerEric Blake <eblake@redhat.com>2012-05-17 12:42:06 -0600
commitd29a7aaa1a2db03c6ef5aaec99b765f7327f3fcf (patch)
tree982ebfe2c9a5eca2d002ca3912dc6133b708aa4c /include
parenttests: add ich6 codec type test to qemuxml2argv-sound-device (diff)
downloadlibvirt-d29a7aaa1a2db03c6ef5aaec99b765f7327f3fcf.tar.gz
libvirt-d29a7aaa1a2db03c6ef5aaec99b765f7327f3fcf.tar.bz2
libvirt-d29a7aaa1a2db03c6ef5aaec99b765f7327f3fcf.zip
Add a new param 'vcpu_time' to virDomainGetCPUStats
Currently virDomainGetCPUStats gets total cpu usage, which consists of: 1. vcpu usage: the physical cpu time consumed by virtual cpu(s) of domain 2. hypervisor: `total cpu usage' - `vcpu usage' The param 'vcpu_time' is for getting vcpu usages.
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index ac5df95e3..a817db80b 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1339,7 +1339,8 @@ int virDomainGetState (virDomainPtr domain,
/**
* VIR_DOMAIN_CPU_STATS_CPUTIME:
- * cpu usage in nanoseconds, as a ullong
+ * cpu usage (sum of both vcpu and hypervisor usage) in nanoseconds,
+ * as a ullong
*/
#define VIR_DOMAIN_CPU_STATS_CPUTIME "cpu_time"
@@ -1355,6 +1356,13 @@ int virDomainGetState (virDomainPtr domain,
*/
#define VIR_DOMAIN_CPU_STATS_SYSTEMTIME "system_time"
+/**
+ * VIR_DOMAIN_CPU_STATS_VCPUTIME:
+ * vcpu usage in nanoseconds (cpu_time excluding hypervisor time),
+ * as a ullong
+ */
+#define VIR_DOMAIN_CPU_STATS_VCPUTIME "vcpu_time"
+
int virDomainGetCPUStats(virDomainPtr domain,
virTypedParameterPtr params,
unsigned int nparams,