[PATCH 1/6] virNodeGetCpuTime: Expose new API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virNodeGetCpuTime: Expose new API

 include/libvirt/libvirt.h.in |   26 ++++++++++++++++++++++++++
 src/libvirt_public.syms      |    1 +
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index bd36015..b61ce9c 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -228,6 +228,21 @@ struct _virNodeInfo {
     unsigned int threads;/* number of threads per core */
 };
 
+/**
+ * virNodeCpuTime:
+ *
+ * a virNodeCpuTime is a structure filled by virNodeGetCpuTime() and providing
+ * the information for the cpu time of Node.
+ */
+
+typedef struct _virNodeCpuTime virNodeCpuTime;
+
+struct _virNodeCpuTime {
+    unsigned long long user;
+    unsigned long long system;
+    unsigned long long idle;
+    unsigned long long iowait;
+};
 
 /**
  * virDomainSchedParameterType:
@@ -460,6 +475,14 @@ int virDomainMigrateSetMaxSpeed(virDomainPtr domain,
 typedef virNodeInfo *virNodeInfoPtr;
 
 /**
+ * virNodeCpuTimePtr:
+ *
+ * a virNodeCpuTimePtr is a pointer to a virNodeCpuTime structure.
+ */
+
+typedef virNodeCpuTime *virNodeCpuTimePtr;
+
+/**
  * virConnectFlags
  *
  * Flags when opening a connection to a hypervisor
@@ -593,6 +616,9 @@ int                     virNodeGetInfo          (virConnectPtr conn,
                                                  virNodeInfoPtr info);
 char *                  virConnectGetCapabilities (virConnectPtr conn);
 
+int                     virNodeGetCpuTime       (virConnectPtr conn,
+                                                 virNodeCpuTimePtr cpu_time);
+
 unsigned long long      virNodeGetFreeMemory    (virConnectPtr conn);
 
 int                     virNodeGetSecurityModel (virConnectPtr conn,
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index b4aed41..53575e1 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -434,6 +434,7 @@ LIBVIRT_0.9.0 {
         virEventRunDefaultImpl;
         virStorageVolDownload;
         virStorageVolUpload;
+        virNodeGetCpuTime;
 } LIBVIRT_0.8.8;
 
 # .... define new API here using predicted next version number ....
-- 
1.7.1

-- 
Minoru Usui <usui@xxxxxxxxxxxxxxxxx>

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]