* [pve-devel] [PATCH manager] api: nodes: add more return descriptions for node status
@ 2024-12-16 16:03 Dominik Csapak
0 siblings, 0 replies; only message in thread
From: Dominik Csapak @ 2024-12-16 16:03 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-16 16:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-16 16:03 [pve-devel] [PATCH manager] api: nodes: add more return descriptions for node status Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox