On 24.02.2012 00:28, Fernando Lemos wrote: > Hi, Benjamin, > > On Thu, Feb 23, 2012 at 6:31 PM, Benjamin Block <[email protected]> wrote: >> Hi folks, >> >> I noticed that there is currently no way to display memory-stats with >> i3status. >> Because I like to know how much memory is used/free on my systems I wrote a >> small addition to i3status to cover this. >> > > I believe we don't have memory stats in i3status because Michael > doesn't think it's a good idea, since it's too volatile and it's not > something you're supposed to monitor. Same thing about CPU usage at a > given time. Have you talked to Michael about this? >
Nah, haven't talked about this with anyone. I just wanted to see my memstats and hacked it in ;) I haven't measured it, but as for the kernel-side-code, it seems not to be much more "volatile" than reading /proc/loadavg or /proc/stat, things that you already do in i3status. It simply reads some system-wide-statistics and iterates over some block-devices to figure out what amount of memory is used for buffers. The userland does only one read on the proc-file and some string-matching, which is ugly as hell but should be fast enough to be negligible (on modern cpu's with things like sseXY or MMX). > > Of course, nothing prevents you from distributing those patches > yourself, feel free to post them here too. > If you don't like it, don't use it :) best regards, - Benjamin
