From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 362BF1FF161 for ; Tue, 24 Sep 2024 14:24:36 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 91744CEE8; Tue, 24 Sep 2024 14:24:48 +0200 (CEST) Message-ID: <9657f668-d3ac-4dd5-aedb-6f4ab1a04cdf@proxmox.com> Date: Tue, 24 Sep 2024 14:24:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Daniel Kral To: Proxmox VE development discussion , Sascha Westermann References: Content-Language: en-US In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL 0.003 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [procfstools.pm, nodes.pm, qemuserver.pm] Subject: Re: [pve-devel] [PATCH pve-common/pve-manager/qemu-server 0/3] Fix #5708: Add CPU raw counters X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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 Tested-by: Daniel Kral _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel