Date: Tue, 14 Feb 2006 07:44:21 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/systat vmstat.c Message-ID: <200602140744.k1E7iLN1069316@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2006-02-14 07:44:21 UTC
FreeBSD src repository
Modified files:
usr.bin/systat vmstat.c
Log:
Fix all (?) cases where the field width of a numeric field was far too
large. In most cases it is still 1 too large, so fields tend to run
together, but in the following cases it was more than 1 too large, and
the starting column was too small too, so the field started inside the
previous field or descriptor and clobbered that:
- "wire": the number for this overwrote 2 characters of the number for
"Flt". Reduce the field width by 3 (2 to avoid the overwrite and 1
so that the fields don't run together). This was already done for
the preceding number for "cow".
- "inact": the number for this overwrote 1 character of the descriptor
"Idle". Reducing the field width by 2 is enough.
- "cache:" the number for this overwrote 3 characters of the scale
"...| |". The field width should be reduced by 4 to keep things
from running together, but that is a lot and not so necessary here
since the final "|" in the scale serves as a delimiter. Only reduce
it by 3.
- "free": the number for this overwrote 2 characters of the bar graph.
The character position under the final "|" in the scale is apparently
not used, so reducing the field width by 3 is enough.
When "zfod" is in the main vmstat display:
- use the normal field width of 9 (not 5) for it since there is no shortage
of space. Fix style bugs (excessive {}) in the statement that
conditionally writes it.
Write all reduced field widths for vmstat fields as "9 - <reduction>" as
a hint that we don't want to reduce them.
Revision Changes Path
1.62 +7 -8 src/usr.bin/systat/vmstat.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602140744.k1E7iLN1069316>
