]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add load average information type into virDomainGetGuestInfo
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 25 Feb 2025 14:36:03 +0000 (15:36 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 3 Mar 2025 13:27:43 +0000 (14:27 +0100)
The public API part.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
include/libvirt/libvirt-domain.h
src/libvirt-domain.c

index f5420bca6e23f4c6885233bee38423612dde9e82..2d27f96be94db342bb5d0e922fc4a13ef0f0e9a9 100644 (file)
@@ -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,
index 072cc3225579109a8ca5eedc235107f0e5bb0006..ae15ab1e5a940f6f09307599bcb9ec958c406cc3 100644 (file)
@@ -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.
  *