1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/usr.bin/ruptime
Bruce Evans e245deadcb Fix formatting. ruptime output on FreeBSD cluster machines annoyed me
by usually being double-spaced due to auto-wrap at column 80.

r212771 increased width of the hostname field from 12 to 25.  This was
supposed to allow for 80-column output with all 3 load averages taking
5 characters each, but it actually gave width exactly 80 and thus worse
than useless auto-wrap in that case.  3 wide load average fields are
unusual, but later expansion of another field gave the auto-wrap with
just 2 wide load average fields.

Change to dynamic field widths for all fields except the uptime.  This
also fixes the formatting of high (above 9999) user counts and not
very high (above 9.99) load averages.  The formatting for numbers now
breaks at 99999.99, but scientific notation should be used starting
well below that.

The field width for the uptime remains hard-coded to work consistently
for uptimes less than 10000 days, but this gives too much space for
small uptimes.  Punctuation between fields could be improved in many
ways, for example by removing it.
2017-03-04 04:06:33 +00:00
..
Makefile
Makefile.depend
ruptime.1 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ruptime.c Fix formatting. ruptime output on FreeBSD cluster machines annoyed me 2017-03-04 04:06:33 +00:00