From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager v2 1/6] fix: nodes: update `idle` key value in hash reference
Date: Wed, 2 Sep 2026 16:59:39 +0200 [thread overview]
Message-ID: <20260902145944.365185-2-s.shaji@proxmox.com> (raw)
In-Reply-To: <20260902145944.365185-1-s.shaji@proxmox.com>
Previously, the /status endpoint returned 0 for the `idle` field because
the idle value read from /proc/uptime was not being used to update the
hash reference.
Fix this by setting the hash reference's `idle` key to the parsed value.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
PVE/API2/Nodes.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 2ca3244d..603f4a06 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -369,6 +369,11 @@ __PACKAGE__->register_method({
additionalProperties => 1,
properties => {
# TODO: document remaining ones
+ idle => {
+ type => "integer",
+ minimum => 0,
+ description => "Sum of how much time each core has spent idle, in seconds.",
+ },
'boot-info' => {
description => "Meta-information about the boot mode.",
type => 'object',
@@ -500,6 +505,7 @@ __PACKAGE__->register_method({
my ($uptime, $idle) = PVE::ProcFSTools::read_proc_uptime();
$res->{uptime} = $uptime;
+ $res->{idle} = $idle;
my ($avg1, $avg5, $avg15) = PVE::ProcFSTools::read_loadavg();
$res->{loadavg} = [$avg1, $avg5, $avg15];
--
2.47.3
next prev parent reply other threads:[~2026-09-02 15:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 14:59 [PATCH manager/proxmox{-yew-comp,} v2 0/6] add missing uptime to the GUI, update API dump, and regenerate pve-api-types Shan Shaji
2026-09-02 14:59 ` Shan Shaji [this message]
2026-09-02 14:59 ` [PATCH pve-manager v2 2/6] fix: node: add missing `uptime` property inside the return schema Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox-yew-comp v2 3/6] fix #7932: add missing uptime to the GUI Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 4/6] chore: pve-api-types: update API dump and regenerate types Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 5/6] pve-api-types: register missing pve-fw-comment-spec verify function Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 6/6] pve-api-types: update API dump for /node/status and regenerate types Shan Shaji
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=20260902145944.365185-2-s.shaji@proxmox.com \
--to=s.shaji@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.