Open pveentjer opened 3 years ago
Good idea. doing this was a common tradition in Unix tools.
It shouldn't be about the amount of seconds, but about the lines of output. For example, vmstat 1
prints a line of output every second, and re-prints the headers ever 25 lines - where 25 is assumed to be a useful terminal-window height.
As far as I can tell, vmstat has this number "25" hard-coded. But an even better approach is to figure out the terminal height. For an application that doesn't need to deal with being resized, the easiest thing is just use use the LINES
environment variable - which all modern shells set.
When running a test for a long period, it becomes unclear what the columns mean:
If e.g. every 10/20 seconds the header was printed, it will be easier to figure out what the meaning is of a column.