[pve-devel] [PATCH container] vmstatus: document more return types

Dominik Csapak d.csapak at proxmox.com
Tue Dec 17 10:32:07 CET 2024


namely 'cpu' and 'mem'

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/LXC.pm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index e78e365..4d20645 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -127,6 +127,12 @@ our $vmstatus_return_properties = {
 	type => 'string',
 	enum => ['stopped', 'running'],
     },
+    mem => {
+	description => "Currently used memory in bytes.",
+	type => 'integer',
+	optional => 1,
+	renderer => 'bytes',
+    },
     maxmem => {
 	description => "Maximum memory in bytes.",
 	type => 'integer',
@@ -191,6 +197,11 @@ our $vmstatus_return_properties = {
 	optional => 1,
 	renderer => 'duration',
     },
+    cpu => {
+	description => "Current CPU usage.",
+	type => 'number',
+	optional => 1,
+    },
     cpus => {
 	description => "Maximum usable CPUs.",
 	type => 'number',
-- 
2.39.5





More information about the pve-devel mailing list