public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] api: nodes: add more return descriptions for node status
Date: Mon, 16 Dec 2024 17:03:18 +0100	[thread overview]
Message-ID: <20241216160318.3903478-1-d.csapak@proxmox.com> (raw)

it's not all fields, but many useful ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 PVE/API2/Nodes.pm | 75 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index e8ff6dd9..9cdf19db 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -438,6 +438,81 @@ __PACKAGE__->register_method({
 		    },
 		},
 	    },
+	    cpu => {
+		type => "number",
+		description => "The current cpu usage.",
+	    },
+	    cpuinfo => {
+		type => "object",
+		properties => {
+		    cores => {
+			type => "integer",
+			description => "The number of physical cores of the CPU.",
+		    },
+		    cpus => {
+			type => "integer",
+			description => "The number of logical threads of the CPU.",
+		    },
+		    model => {
+			type => "string",
+			description => "The CPU model",
+		    },
+		    sockets => {
+			type => "integer",
+			description => "The number of logical threads of the CPU.",
+		    },
+		},
+	    },
+	    loadavg => {
+		type => 'array',
+		description => "An array of load avg for 1, 5 and 15 minutes respectively.",
+		items => {
+		    type => 'string',
+		    description => "The value of the load.",
+		}
+	    },
+	    memory => {
+		type => "object",
+		properties => {
+		    free => {
+			type => "integer",
+			description => "The free memory in bytes.",
+		    },
+		    total => {
+			type => "integer",
+			description => "The total memory in bytes.",
+		    },
+		    used => {
+			type => "integer",
+			description => "The used memory in bytes.",
+		    },
+		},
+	    },
+	    pveversion => {
+		type => 'string',
+		description => "The PVE version string.",
+	    },
+	    rootfs => {
+		type => "object",
+		properties => {
+		    free => {
+			type => "integer",
+			description => "The free bytes on the root filesystem.",
+		    },
+		    total => {
+			type => "integer",
+			description => "The total size of the root filesystem in bytes.",
+		    },
+		    used => {
+			type => "integer",
+			description => "The used bytes in the root filesystem.",
+		    },
+		    avail => {
+			type => "integer",
+			description => "The available bytes in the root filesystem.",
+		    },
+		},
+	    }
 	},
     },
     code => sub {
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


                 reply	other threads:[~2024-12-16 16:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241216160318.3903478-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal