public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Sascha Westermann <sascha.westermann@hl-services.de>
Subject: Re: [pve-devel] [PATCH pve-common/pve-manager/qemu-server 0/3] Fix #5708: Add CPU raw counters
Date: Tue, 24 Sep 2024 14:24:44 +0200	[thread overview]
Message-ID: <9657f668-d3ac-4dd5-aedb-6f4ab1a04cdf@proxmox.com> (raw)
In-Reply-To: <mailman.5.1726728980.332.pve-devel@lists.proxmox.com>

On 9/17/24 07:50, Sascha Westermann via pve-devel wrote:
> 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.

Thanks for submitting a patch series for your bug report! That's great!

I've added comments wherever I found something interesting and annotated 
them next to the patch diffs. Those are open for discussion of course.

Cheers,
Daniel

> 
> 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

Reviewed-by: Daniel Kral <d.kral@proxmox.com>
Tested-by: Daniel Kral <d.kral@proxmox.com>


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


      reply	other threads:[~2024-09-24 12:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17  5:50 Sascha Westermann via pve-devel
2024-09-24 12:24 ` Daniel Kral [this message]

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=9657f668-d3ac-4dd5-aedb-6f4ab1a04cdf@proxmox.com \
    --to=d.kral@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=sascha.westermann@hl-services.de \
    /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