[PATCH v2 1/4] Add load average information type into virDomainGetGuestInfo

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

 



The public API part.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 include/libvirt/libvirt-domain.h | 1 +
 src/libvirt-domain.c             | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index f5420bca6e23..2d27f96be94d 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -6455,6 +6455,7 @@ typedef enum {
     VIR_DOMAIN_GUEST_INFO_FILESYSTEM = (1 << 4), /* return filesystem information (Since: 5.7.0) */
     VIR_DOMAIN_GUEST_INFO_DISKS = (1 << 5), /* return disks information (Since: 7.0.0) */
     VIR_DOMAIN_GUEST_INFO_INTERFACES = (1 << 6), /* return interfaces information (Since: 7.10.0) */
+    VIR_DOMAIN_GUEST_INFO_LOAD = (1 << 7), /* return load averages (Since: 11.2.0) */
 } virDomainGuestInfoTypes;
 
 int virDomainGetGuestInfo(virDomainPtr domain,
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 072cc3225579..ae15ab1e5a94 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -13292,6 +13292,14 @@ virDomainSetVcpu(virDomainPtr domain,
  *      "if.<num>.addr.<num1>.addr" - the IP address of addr <num1>
  *      "if.<num>.addr.<num1>.prefix" - the prefix of IP address of addr <num1>
  *
+ * VIR_DOMAIN_GUEST_INFO_LOAD:
+ *  Returns load (the number of processes in the runqueue or waiting for disk
+ *  I/O) as double values:
+ *
+ *      "load.1m" - load averaged over 1 minute
+ *      "load.5m" - load averaged over 5 minutes
+ *      "load.15m" - load averaged over 15 minutes
+ *
  * Using 0 for @types returns all information groups supported by the given
  * hypervisor.
  *
-- 
2.48.1




[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]

  Powered by Linux