On 01/17/15 00:09, enh wrote: > more progress... ... > I’ve moved the following commands over to toybox, removing the old > toolbox implementations: > > vmstat
Going into a bit more depth on vmstat, on my netbook right now: $ vmstat procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 7 0 2677468 163892 129332 970508 15 12 132 117 2 15 37 7 54 2 $ ./toybox vmstat procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 2 0 2677468 166900 129376 971616 14 11 473 418 0 777 37 7 54 2 The "memory" and "system" fields (swpd, free, buff, cache, us, sy, id, wa) look right. (And at least mine gets the rounding right. :) The "swap" fields (si/so) are close but _consistently_ off by one, some sort of rounding difference?. The i/o stuff isn't even close and I haven't got a clue what it thinks it's reporting. The ratios are consistent but: >>> print 473.0/132.0 3.58333333333 >>> print 418/117.0 3.57264957265 Three and a bit? (Rounding _and_ different block size...?) And then there's "system". I have no idea what that's displaying. Also, vmstat and ls both do variable indenting of fields, but use completely different implementations that don't genericize easily. (ls is doing readahead and measuring, vmstat has an array of fields each marked with a padding length and if it goes over it forces the padding of all future fields to one space until it's back under budget. Not really the same, but the human readable changes pending elsewhere open this can of worms in a _third_ way...) So that's why _that_ one is in the pending README. Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net