bottom
bottom copied to clipboard
Feature: Add buffer and cache memory
Describe the feature request
htop uses blue color to show part of the memory used for buffers and yellow/orange color to show part of the memory used for caching. Is it something that could be added to btm? Maybe not by default, as it could make the graph less readable, but as an option?
Sure, I can look into that!
Bump? I was wondering why kswap0d was taking up so much CPU when btm showed my RAM to be ~3.1 GB out of 9.9 GB. However, when I looked at top, it turns out that 6 GB was taken up by cache, which made more sense.
Made a simple implementation of this, but i'm no UX person so i don't know if the graph should maybe be stacked or something, and the method used to get the cache+buffer size is somewhat dubious, though it should be accurate enough. Basically i'm taking the difference between the amount of "available" memory (since cache memory is allowed to be overwritten) and "free" memory, which does not include the cache.