[pve-devel] [RFC cluster 1/4] rrd: add free, buffer/cache and arc size to memory statistics
Folke Gleumes
f.gleumes at proxmox.com
Mon Dec 11 15:47:18 CET 2023
adding values to the rrd format break compatability with the old file.
Therfore the filename/path had to be changed as well.
Signed-off-by: Folke Gleumes <f.gleumes at proxmox.com>
---
src/pmxcfs/status.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/pmxcfs/status.c b/src/pmxcfs/status.c
index dc44464..8834644 100644
--- a/src/pmxcfs/status.c
+++ b/src/pmxcfs/status.c
@@ -1130,7 +1130,10 @@ static const char *rrd_def_node[] = {
"DS:cpu:GAUGE:120:0:U",
"DS:iowait:GAUGE:120:0:U",
"DS:memtotal:GAUGE:120:0:U",
+ "DS:memfree:GAUGE:120:0:U",
"DS:memused:GAUGE:120:0:U",
+ "DS:membuffercache:GAUGE:120:0:U",
+ "DS:arcsize:GAUGE:120:0:U",
"DS:swaptotal:GAUGE:120:0:U",
"DS:swapused:GAUGE:120:0:U",
"DS:roottotal:GAUGE:120:0:U",
@@ -1252,7 +1255,7 @@ update_rrd_data(
int skip = 0;
- if (strncmp(key, "pve2-node/", 10) == 0) {
+ if (strncmp(key, "pve8-node/", 10) == 0) {
const char *node = key + 10;
skip = 2;
@@ -1267,12 +1270,12 @@ update_rrd_data(
if (!g_file_test(filename, G_FILE_TEST_EXISTS)) {
- mkdir(RRDDIR "/pve2-node", 0755);
+ mkdir(RRDDIR "/pve8-node", 0755);
int argcount = sizeof(rrd_def_node)/sizeof(void*) - 1;
create_rrd_file(filename, argcount, rrd_def_node);
}
- } else if ((strncmp(key, "pve2-vm/", 8) == 0) ||
+ } else if ((strncmp(key, "pve8-vm/", 8) == 0) ||
(strncmp(key, "pve2.3-vm/", 10) == 0)) {
const char *vmid;
--
2.39.2
More information about the pve-devel
mailing list