From 8b4b9c7e5dd508a02d223eb984c9c591eb7336c0 Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Thu, 7 Nov 2024 21:50:24 -0300 Subject: [PATCH] system: monitoring: Fix ram-total to display total available ram in bytes instead of kilobytes --- radix/system/monitoring.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radix/system/monitoring.scm b/radix/system/monitoring.scm index ec641ff..28a4905 100644 --- a/radix/system/monitoring.scm +++ b/radix/system/monitoring.scm @@ -55,10 +55,11 @@ lines))) (define (ram-total) + "Returns the total available ram in bytes." (call-with-input-file "/proc/meminfo" (lambda (port) (let ((_ (read port))) - (read port))))) + (* 1000 (read port)))))) (define (current-ram-usage) (apply - (map (cut assoc-ref (current-memory-info) <>)