Closed dankamongmen closed 5 years ago
I think this ought be a core part of growlight, even though it's not being treated as such in growlight-readline (#20). Advantages include:
disadvantages:
oooh, another advantage: we could show a history of usage in the detail command
We're collecting the stats now, though we're not yet tying them into the struct device elements.
Alright, we're now keeping track of a single timespan of disk stats, running them from a single place, and storing them with the respective devices, as is sane. I think this is done!
To implement #5 , we'll need get kernel disk statistics. I say we use
/proc/diskstats
rather than the/sysfs
entries, both to keep the number of filesystem operations to a minimum O(1) vs O(N) and to be able to break them down by partition, which I don't think sysfs provides. We have to lex some crap either way. sysfs does provide more detailed stats, IIRC.https://www.kernel.org/doc/Documentation/block/stat.txt https://www.kernel.org/doc/Documentation/iostats.txt