system: monitoring: Fix ram-total to display total available ram in bytes instead of kilobytes

main
Luis Guilherme Coelho 2024-11-07 21:50:24 -03:00
parent de278ddb71
commit 8b4b9c7e5d
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 2 additions and 1 deletions

View File

@ -55,10 +55,11 @@
lines))) lines)))
(define (ram-total) (define (ram-total)
"Returns the total available ram in bytes."
(call-with-input-file "/proc/meminfo" (call-with-input-file "/proc/meminfo"
(lambda (port) (lambda (port)
(let ((_ (read port))) (let ((_ (read port)))
(read port))))) (* 1000 (read port))))))
(define (current-ram-usage) (define (current-ram-usage)
(apply - (map (cut assoc-ref (current-memory-info) <>) (apply - (map (cut assoc-ref (current-memory-info) <>)