svn commit: r292817 - head/usr.bin/systat

Bruce Evans brde at optusnet.com.au
Mon Dec 28 07:46:51 UTC 2015


On Mon, 28 Dec 2015, Marcelo Araujo wrote:

> Log:
>  Add on systat -vm the ability to display the physical and kernel memory
>  percent usage.
>
>  PR:		bin/203917
>  Submitted by:	ota <ota at j.email.ne.jp>
>  Approved by:	bapt (mentor)
>  Differential Revision:	https://reviews.freebsd.org/D4281

This has lots of style bugs in both the output and the source code.  There
was negative space for expansion, but some space is used to squeeze memory-
related variables in between the general stats line and the memory lines.
I think they would fit in the general stats line and not look quites as bad
there.  This line now uses 67 columns and only needs about 50 of these.

Style bugs start with not updating the comment about STATROW.  It still
says that that this (really the STAT window) uses 1 row and 67 columns,
but it now uses 2 row.  This use is an abuse.  It would be clearer to
put the new memory statistics in a new window.  They don't really fit
in tje MEM window either, and putting them there would change all the
existing line numbers there.

Some other statistics are squeezed into out of the way places and not
printed if the terminal is not large enough.  nbuf is one of these.
Displaying it is not very useful since (like the variables in this commit
and unlike almost all the other variables in the display), it is constant.
It is also less useful than the variables in this commit.  So it is put
on line 24 of 0-24 and not displayed unless the terminal has > 25 lines
since the last line is reserved for input.

I recently noticed that the interrupt lines are misformatted by letting
them run into the interactive i/o line (probably also outside the
window where they are not displayed of course) if there are many of
them.  Then if you do input, it makes a mess by erasing the last
displayed interrupt line, but not completely.  The line is first erased
completely, but later the count is refreshed but the description is
not.  Switching to another display and back gives the same mess, with
the description displayed for an instant on switching back before it
is erased by info on the i/o line.

Bruce


More information about the svn-src-all mailing list