[Toybox] New toy: vmstat
Rob Landley
rob at landley.net
Wed Apr 11 16:52:48 PDT 2012
On 04/11/2012 01:13 AM, Elie De Brauwer wrote:
> One sidenote with the query of the height though, how I frequently use
> vmstat is just redirect the output to a file, and use some scripts to do
> some datamining on it later (any spikes in cpu usage/interrupts/how is
> memory usage evolving over time ? ...) I think that using terminal
> escape sequences (you'd need to do these things periodically, not per se
> every loop) would break this approach ?
No, you only do it if isatty() says that this is a tty device, but the
tty device doesn't know what size it should be (returns 0,0).
In any case, the size querying logic should handle this for you
automatically (eventually), the comment was just about not calling it
_too_ frequently, which probably isn't an issue here.
Rob
--
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation. Pick one.
1334188368.0
More information about the Toybox
mailing list