public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-common/pve-manager/qemu-server 0/3] Fix #5708: Add CPU raw counters
@ 2024-09-17  5:50 Sascha Westermann via pve-devel
  2024-09-24 12:24 ` Daniel Kral
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Westermann via pve-devel @ 2024-09-17  5:50 UTC (permalink / raw)
  To: pve-devel; +Cc: Sascha Westermann

[-- Attachment #1: Type: message/rfc822, Size: 11917 bytes --]

From: Sascha Westermann <sascha.westermann@hl-services.de>
To: pve-devel@lists.proxmox.com
Cc: Sascha Westermann <sascha.westermann@hl-services.de>
Subject: [PATCH pve-common/pve-manager/qemu-server 0/3] Fix #5708: Add CPU raw counters
Date: Tue, 17 Sep 2024 07:50:17 +0200
Message-ID: <20240917055020.10507-1-sascha.westermann@hl-services.de>

To monitor the CPU utilization of nodes and Qemu VMs at arbitrary
intervals (e.g. every 30 seconds) via the Proxmox API, there are no
suitable endpoints right now:

/api2/json/nodes/{node}/status (cpu): Instant value
/api2/json/nodes/{node}/rrddata?timeframe=hour (cpu): Average values 
per minute

/api2/json/nodes/{node}/qemu (cpu): Instant value
/api2/json/nodes/{node}/qemu/{vmid}/rrddata?timeframe=hour (cpu):
Average values per minute

Instant values have the disadvantage that short-term peaks distort the
value. The average values from rrddata provide usable average values,
but you are restricted to a minute time window and the values can be
up to one minute old.

The following patches add raw counter values to a "cpustat" map in
the corresponding endpoints.

pve-common:

Sascha Westermann (1):
  Add CPU raw counters

 src/PVE/ProcFSTools.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

pve-manager:

Sascha Westermann (1):
  Add CPU raw counters

 PVE/API2/Nodes.pm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

qemu-server:

Sascha Westermann (1):
  Add CPU raw counters

 PVE/QemuServer.pm | 55 +++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

-- 
2.46.0



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-24 12:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-17  5:50 [pve-devel] [PATCH pve-common/pve-manager/qemu-server 0/3] Fix #5708: Add CPU raw counters Sascha Westermann via pve-devel
2024-09-24 12:24 ` Daniel Kral

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