Feature request: RAM meter
walles opened this issue · 2 comments
walles commented
We should have another thing like the system load meter, but showing RAM usage.
Things to be visualized:
- Total RAM size
- Used RAM
- Free RAM
- If used > total (system forced to swap), the amount of overshoot should be obvious
Measuring RAM usage
For macOS, just do the same thing as Bubblemon, a lot of thought has gone into this:
- https://github.com/walles/bubblemon/blob/0a2c86eb45c17d806b5def12532d1db538a3c9ae/osx/osx-meter.c#L48
- Formula (now with "speculative" pages as well after some experiments):
- total = free + active + inactive + speculative + wired
For Linux: Don't know since /proc/meminfo
contains 51 lines of info on a system I just checked, but a start would be:
used = memory.total - (memory.free + memory.cached + memory.buffer)
(also from Bubblemon)
walles commented
Suggested visualization:
- A string saying:
Load: 73% 12Gb/16Gb
- Except for the initial
Load:
part, the string comes with different color depending on usage:- Under 75%: Black on Green
- Under 100%: Black on Yellow
- 100% and up: White on Red
This would become a new line underneath the System Load one.
walles commented