Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Oct 2016 10:35:59 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Mark Johnston <markj@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   Re: svn commit: r306831 - in user/alc/PQ_LAUNDRY/usr.bin: systat vmstat
Message-ID:  <20161008093219.O2989@besplex.bde.org>
In-Reply-To: <201610072217.u97MHh08042582@repo.freebsd.org>
References:  <201610072217.u97MHh08042582@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 7 Oct 2016, Mark Johnston wrote:

> Log:
>  Teach vmstat and systat about v_pdshortfalls.

systat has a negative amount of space available for expansion.

> Modified: user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c
> ==============================================================================
> --- user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c	Fri Oct  7 22:17:25 2016	(r306830)
> +++ user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c	Fri Oct  7 22:17:43 2016	(r306831)
> @@ -339,14 +340,15 @@ labelkre(void)
> 	mvprintw(VMSTATROW + 8, VMSTATCOL + 9, "react");
> 	mvprintw(VMSTATROW + 9, VMSTATCOL + 9, "pdwak");
> 	mvprintw(VMSTATROW + 10, VMSTATCOL + 9, "pdpgs");
> -	mvprintw(VMSTATROW + 11, VMSTATCOL + 9, "intrn");
> -	mvprintw(VMSTATROW + 12, VMSTATCOL + 9, "wire");
> -	mvprintw(VMSTATROW + 13, VMSTATCOL + 9, "act");
> -	mvprintw(VMSTATROW + 14, VMSTATCOL + 9, "inact");
> -	mvprintw(VMSTATROW + 15, VMSTATCOL + 9, "laund");
> -	mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "free");
> -	if (LINES - 1 > VMSTATROW + 17)
> -		mvprintw(VMSTATROW + 17, VMSTATCOL + 9, "buf");
> +	mvprintw(VMSTATROW + 11, VMSTATCOL + 9, "pdshort");
> +	mvprintw(VMSTATROW + 12, VMSTATCOL + 9, "intrn");
> +	mvprintw(VMSTATROW + 13, VMSTATCOL + 9, "wire");
> +	mvprintw(VMSTATROW + 14, VMSTATCOL + 9, "act");
> +	mvprintw(VMSTATROW + 15, VMSTATCOL + 9, "inact");
> +	mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "laund");
> +	mvprintw(VMSTATROW + 17, VMSTATCOL + 9, "free");
> +	if (LINES - 1 > VMSTATROW + 18)
> +		mvprintw(VMSTATROW + 18, VMSTATCOL + 9, "buf");
>
> 	mvprintw(GENSTATROW, GENSTATCOL, " Csw  Trp  Sys  Int  Sof  Flt");

Already the display of 'buf' was broken by expansion: on freefall now:

    30 users    Load  0.21  0.18  0.13                  Oct  7 22:32
    Mem usage:  82%Phy 10%Kmem
Mem: KB    REAL            VIRTUAL                      VN PAGER   SWAP PAGER
         Tot   Share      Tot    Share    Free           in   out     in   out
Act  784512   23764  7319516    42640 4515744  count
All  893752  129672  7995532   624636          pages
Proc:                                                            Interrupts
   r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        ioflt   569 total
             422      3216   49  362  232   33    5      1 cow         uart0 4
                                                         2 zfod     29 cpu0:timer
  0.3%Sys   0.0%Intr  0.0%User  0.0%Nice 99.7%Idle         ozfod     4 igb0:que 0
|    |    |    |    |    |    |    |    |    |           %ozfod     1 igb0:que 1
                                                           daefr    12 igb0:que 2
                                          1 dtbuf       93 prcfr     1 igb0:que 3
Namei     Name-cache   Dir-cache    485980 desvn      117 totfr    10 igb0:que 4
    Calls    hits   %    hits   %    485400 numvn          react     1 igb0:que 5
       17      17 100                179227 frevn          pdwak     1 igb0:que 6
                                                       147 pdpgs     4 igb0:que 7
Disks   da0   da1   da2   da3   da4   da5   da6           intrn       igb0:link
KB/t  20.12 19.75 19.75 20.00 19.62 20.00  0.00   5096864 wire    196 ciss0 274
tps      31    31    31    31    31    31     0    330628 act      27 cpu1:timer
MB/s   0.61  0.60  0.60  0.60  0.59  0.60  0.00  14524764 inact     6 cpu18:time
%busy    15    13    16    16    18    15     0           cache     7 cpu8:timer
                                                   4515744 free      3 cpu10:time
                                                                     2 cpu16:time

'buf' is not important, but 'free' is.

The last line is not available for the main display, but is used for the
cpu16:time<content lost to verbose naming>.  This line is used for input,
so and everything displayed on it is cleared for input and then messed up
in an uglier way by redisplaying only parts (for the cpu16: field, the
count is re-displayed on screen refresh but the description is not
re-displayed without a switch to another screen and back).

The interrupts column and the input line are generally broken.  With
24 CPUs and also some other per-cpu interrupt counts, it takes about
a 200-row terminal to display all the interrupts and then 1 more row
to stop the input line running into the interrupts.  The rest of the
display is tuned for 25 rows and looks strange when it is 7/8 unused.
Per-CPU interrupts are also miscounted in totals...

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161008093219.O2989>