From: Michael Tremer Date: Fri, 27 Mar 2026 18:28:19 +0000 (+0000) Subject: graphs: memory: Plot the correct percentage fields X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8e5260d3abb0a7d8d60e0ffe5e79b52427240b4;p=telemetry.git graphs: memory: Plot the correct percentage fields We have been printing the raw bytes instead. Signed-off-by: Michael Tremer --- diff --git a/src/daemon/graphs/memory.c b/src/daemon/graphs/memory.c index 0697cf8..13d08ab 100644 --- a/src/daemon/graphs/memory.c +++ b/src/daemon/graphs/memory.c @@ -64,7 +64,7 @@ static int memory_render(td_ctx* ctx, td_graph* graph, PRINT_CAMM(args, "mem_used", NULL, LARGE_FLOAT); PRINT_EMPTY_LABEL(args); - PRINT_CAMM(args, "mem_used", NULL, PERCENTAGE); + PRINT_CAMM(args, FIELD_PERCENT("mem_used"), NULL, PERCENTAGE); DRAW_AREA_OUTLINE_WITH_LABEL(args, "buffers", NULL, COLOR_BUFFERS, STACKED, _("Buffers")); PRINT_CAMM(args, "buffers", NULL, LARGE_FLOAT); @@ -82,7 +82,7 @@ static int memory_render(td_ctx* ctx, td_graph* graph, PRINT_CAMM(args, "swap_used", NULL, LARGE_FLOAT); PRINT_EMPTY_LABEL(args); - PRINT_CAMM(args, "swap_used", NULL, PERCENTAGE); + PRINT_CAMM(args, FIELD_PERCENT("swap_used"), NULL, PERCENTAGE); DRAW_LINE_WITH_LABEL(args, 1, "swap_total", NULL, COLOR_SWAP_TOTAL, DASHED | SKIPSCALE, _("Total Swap"));