]> git.ipfire.org Git - telemetry.git/commitdiff
graphs: memory: Plot the correct percentage fields
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Mar 2026 18:28:19 +0000 (18:28 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Mar 2026 18:28:19 +0000 (18:28 +0000)
We have been printing the raw bytes instead.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/graphs/memory.c

index 0697cf8a7cdb1c880b9ebd9742a5c7fda26b9a19..13d08ab872758ea0db5d0184063f8806c288b3d1 100644 (file)
@@ -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"));