=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/vmstat.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/systat/vmstat.c 2001/06/27 06:16:49 1.24 --- src/usr.bin/systat/vmstat.c 2001/08/28 05:17:55 1.25 *************** *** 1,4 **** ! /* $OpenBSD: vmstat.c,v 1.24 2001/06/27 06:16:49 art Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: vmstat.c,v 1.25 2001/08/28 05:17:55 weingart Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif ! static char rcsid[] = "$OpenBSD: vmstat.c,v 1.24 2001/06/27 06:16:49 art Exp $"; #endif /* not lint */ /* --- 38,44 ---- #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif ! static char rcsid[] = "$OpenBSD: vmstat.c,v 1.25 2001/08/28 05:17:55 weingart Exp $"; #endif /* not lint */ /* *************** *** 184,190 **** #define VMSTATCOL 48 #define GRAPHROW 10 /* uses 3 rows and 51 cols */ #define GRAPHCOL 0 ! #define NAMEIROW 14 /* uses 3 rows and 38 cols */ #define NAMEICOL 0 #define DISKROW 18 /* uses 5 rows and 50 cols (for 9 drives) */ #define DISKCOL 0 --- 184,190 ---- #define VMSTATCOL 48 #define GRAPHROW 10 /* uses 3 rows and 51 cols */ #define GRAPHCOL 0 ! #define NAMEIROW 14 /* uses 3 rows and 49 cols */ #define NAMEICOL 0 #define DISKROW 18 /* uses 5 rows and 50 cols (for 9 drives) */ #define DISKCOL 0 *************** *** 350,358 **** mvprintw(GRAPHROW + 1, GRAPHCOL, "| | | | | | | | | | |"); ! mvprintw(NAMEIROW, NAMEICOL, "Namei Sys-cache Proc-cache"); mvprintw(NAMEIROW + 1, NAMEICOL, ! " Calls hits %% hits %%"); mvprintw(DISKROW, DISKCOL, "Discs"); mvprintw(DISKROW + 1, DISKCOL, "seeks"); mvprintw(DISKROW + 2, DISKCOL, "xfers"); --- 350,359 ---- mvprintw(GRAPHROW + 1, GRAPHCOL, "| | | | | | | | | | |"); ! mvprintw(NAMEIROW, NAMEICOL, ! "Namei Sys-cache Proc-cache No-cache"); mvprintw(NAMEIROW + 1, NAMEICOL, ! " Calls hits %% hits %% miss %%"); mvprintw(DISKROW, DISKCOL, "Discs"); mvprintw(DISKROW + 1, DISKCOL, "seeks"); mvprintw(DISKROW + 2, DISKCOL, "xfers"); *************** *** 532,544 **** dinfo(i, ++c); } putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 9); ! putint(nchtotal.ncs_goodhits, NAMEIROW + 2, NAMEICOL + 9, 9); #define nz(x) ((x) ? (x) : 1) putfloat(nchtotal.ncs_goodhits * 100.0 / nz(s.nchcount), NAMEIROW + 2, NAMEICOL + 19, 4, 0, 1); ! putint(nchtotal.ncs_pass2, NAMEIROW + 2, NAMEICOL + 23, 9); putfloat(nchtotal.ncs_pass2 * 100.0 / nz(s.nchcount), ! NAMEIROW + 2, NAMEICOL + 34, 4, 0, 1); #undef nz } --- 533,549 ---- dinfo(i, ++c); } putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 9); ! putint(nchtotal.ncs_goodhits, NAMEIROW + 2, NAMEICOL + 10, 8); #define nz(x) ((x) ? (x) : 1) putfloat(nchtotal.ncs_goodhits * 100.0 / nz(s.nchcount), NAMEIROW + 2, NAMEICOL + 19, 4, 0, 1); ! putint(nchtotal.ncs_pass2, NAMEIROW + 2, NAMEICOL + 24, 7); putfloat(nchtotal.ncs_pass2 * 100.0 / nz(s.nchcount), ! NAMEIROW + 2, NAMEICOL + 33, 4, 0, 1); ! putint(nchtotal.ncs_miss - nchtotal.ncs_pass2, ! NAMEIROW + 2, NAMEICOL + 38, 7); ! putfloat((nchtotal.ncs_miss - nchtotal.ncs_pass2) * ! 100.0 / nz(s.nchcount), NAMEIROW + 2, NAMEICOL + 45, 4, 0, 1); #undef nz }