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 BD1771FF16B for ; Tue, 15 Jul 2025 16:34:21 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 959DA85EE; Tue, 15 Jul 2025 16:33:00 +0200 (CEST) From: Aaron Lauterer To: pve-devel@lists.proxmox.com Date: Tue, 15 Jul 2025 16:32:03 +0200 Message-Id: <20250715143218.1548306-20-a.lauterer@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250715143218.1548306-1-a.lauterer@proxmox.com> References: <20250715143218.1548306-1-a.lauterer@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.019 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_MSPIKE_H2 0.001 Average reputation (+2) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager v3 06/14] ui: rrdmodels: add new columns and update existing 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Memory columns will be used in an area graph, which cannot handle gaps directly. Therefore we set the default value to 'null'. This makes it easier to handle the tooltip when there is no data. We calculate memused to subtract the arcsize. While the columns report what they represent, in the stacked/area memory graph of the node we need to account for the fact that memused includes the ZFS arc. We also calculate the total / free memory for nodes and guests to get the diff from the configured/max memory from the current used one. Otherwise, we might see some spikes in the overall memory graph, as the can be small timing differences when the data is collected. Signed-off-by: Aaron Lauterer --- Notes: changes since: v2: * add default values where needed for area graphs * add calculated values, usually to keep the memory graphs from spiking at the top due to slight timing differences where the data doesn't align perfectly RFC: * drop node memcache and membuffer columns as we now have memavailable which is better suited www/manager6/data/model/RRDModels.js | 44 ++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/www/manager6/data/model/RRDModels.js b/www/manager6/data/model/RRDModels.js index 82f4e5cd..70b45986 100644 --- a/www/manager6/data/model/RRDModels.js +++ b/www/manager6/data/model/RRDModels.js @@ -18,14 +18,39 @@ Ext.define('pve-rrd-node', { 'loadavg', 'maxcpu', 'memtotal', - 'memused', + { name: 'memused', defaultValue: null }, 'netin', 'netout', 'roottotal', 'rootused', 'swaptotal', 'swapused', + { name: 'memfree', defaultValue: null }, + { name: 'arcsize', defaultValue: null }, + 'pressurecpusome', + 'pressureiosome', + 'pressureiofull', + 'pressurememorysome', + 'pressurememoryfull', { type: 'date', dateFormat: 'timestamp', name: 'time' }, + { + name: 'memfree-capped', + calculate: function (data) { + if (data.memtotal === null || data.memused === null) { + return null; + } + return data.memtotal - data.memused; + }, + }, + { + name: 'memused-sub-arcsize', + calculate: function (data) { + if (data.memused === null) { + return null; + } + return data.memused - data.arcsize; + }, + }, ], }); @@ -42,13 +67,26 @@ Ext.define('pve-rrd-guest', { 'maxcpu', 'netin', 'netout', - 'mem', - 'maxmem', + { name: 'mem', defaultValue: null }, + { name: 'maxmem', defaultValue: null}, 'disk', 'maxdisk', 'diskread', 'diskwrite', + {name: 'memhost', defaultValue: null}, + 'pressurecpusome', + 'pressurecpufull', + 'pressureiosome', + 'pressurecpufull', + 'pressurememorysome', + 'pressurememoryfull', { type: 'date', dateFormat: 'timestamp', name: 'time' }, + { + name: 'maxmem-capped', + calculate: function (data) { + return data.maxmem - data.mem; + }, + }, ], }); -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel