aboutsummaryrefslogtreecommitdiff
path: root/toys/other/vmstat.c
AgeCommit message (Collapse)Author
2020-05-21vmstat: increase column sizesPetri Gynther
Increase memory:swpd,free,cache to 7 characters Increase swap:si,so to 5 characters Increase system:in,cs to 5 characters Sample output from Pixel 4 phone: procs ------------memory------------ ----swap--- -----io---- ---system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 4 0 1111676 87896 6328 2268596 8152 11896 10712 14280 0 25712 31 21 46 3 17 0 1082788 224292 5972 2213996 73220 68908 2432 3948 1 26611 41 38 22 0 6 0 1127316 203196 5972 2225164 8980 53996 11796 788 0 25200 33 22 45 1 0 0 1133072 200984 5972 2225280 416 6260 52 88 0 8543 10 6 84 0 2 0 1128976 196976 5972 2225692 3588 0 340 800 0 5243 5 4 91 0
2018-04-06Fix precedence error in vmstat.Elliott Hughes
toys/other/vmstat.c:98:12: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if ((!toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows); ^ ~
2018-03-28Haroon Maqsood pointed out "vmstat 1 1" didn't stop and "vmstat -n" didn'tRob Landley
print the first header line.
2018-03-23Add the extra info we've got back to the error message.Rob Landley
2018-03-21Collate two error messages that both mean "your kernel is broken".Rob Landley
2018-03-21Fix vmstat for large machines.Elliott Hughes
48 cores is too much to fit in toybuf.
2015-12-29Add strafter() to lib.Rob Landley
2015-09-02vmstat: fix units for bi and bo columnsColin Cross
pgpgin and pgpgout in /proc/vmstat are in kbytes, not pages. (see http://lxr.free-electrons.com/source/mm/vmstat.c?v=4.2#L1310). Remove the extra * page_kb for io_in and io_out.
2015-09-01Trivial code style tweak.Rob Landley
2015-09-01vmstat: reset header pointer when loopingColin Cross
Modifying the headers pointer when printing the headers causes a buffer overrun the second time they are printed. Use a local header pointer that is reset to the beginning of the buffer for each loop.
2015-08-02Mark command-local functions static.Rob Landley
2015-05-31Move the magic list of commands needing cleanup from toys/pending/READMERob Landley
to greppable TODO annotations in the individual files. (grep -riw TODO)
2014-12-02Fix bug pointed out by Elliott Hughes ("vmstat 1" should repeat endlessly), ↵Rob Landley
and remove final delay (after all output) for "vmstat 2 3" case.
2013-12-27Cleanup vmstat. Procs, memory, and cpu are reading right, the others not so ↵Rob Landley
much.
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
2012-10-08New build infrastructure to generate FLAG_ macros and TT alias, #define ↵Rob Landley
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
2012-08-25Regularize command headers, update links to standards documents.Rob Landley
2012-08-25Move commands into "posix", "lsb", and "other" menus/directories.Rob Landley