system: monitoring: Fix ram-total to display total available ram in bytes instead of kilobytes
parent
de278ddb71
commit
8b4b9c7e5d
|
@ -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) <>)
|
||||
|
|
Loading…
Reference in New Issue