summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/vmstat.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2009-08-13 23:45:35 +0000
committerderaadt <deraadt@openbsd.org>2009-08-13 23:45:35 +0000
commitf429edc309387ece992c9e01bf9ac9a66906e004 (patch)
tree979282c877204ec36a330a3aa7c5d7c31526810c /usr.bin/systat/vmstat.c
parentSwitch the prompt code to return an empty string when the user enters no (diff)
downloadwireguard-openbsd-f429edc309387ece992c9e01bf9ac9a66906e004.tar.xz
wireguard-openbsd-f429edc309387ece992c9e01bf9ac9a66906e004.zip
there are louder and louder moans about the inability to see packet
rates at the same time as interrupt counts, so sneak them into the bottom corner of the vmstat screen ok dlg
Diffstat (limited to 'usr.bin/systat/vmstat.c')
-rw-r--r--usr.bin/systat/vmstat.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index b5335798346..480000481fc 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmstat.c,v 1.69 2009/05/03 05:01:54 drahn Exp $ */
+/* $OpenBSD: vmstat.c,v 1.70 2009/08/13 23:45:35 deraadt Exp $ */
/* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
#endif
-static char rcsid[] = "$OpenBSD: vmstat.c,v 1.69 2009/05/03 05:01:54 drahn Exp $";
+static char rcsid[] = "$OpenBSD: vmstat.c,v 1.70 2009/08/13 23:45:35 deraadt Exp $";
#endif /* not lint */
/*
@@ -251,6 +251,11 @@ labelkre(void)
mvprintw(INTSROW, INTSCOL + 3, " Interrupts");
mvprintw(INTSROW + 1, INTSCOL + 9, "total");
+ if (LINES - 1 > VMSTATROW + 17)
+ mvprintw(VMSTATROW + 17, INTSCOL + 9, "IPKTS");
+ if (LINES - 1 > VMSTATROW + 18)
+ mvprintw(VMSTATROW + 18, INTSCOL + 9, "OPKTS");
+
mvprintw(VMSTATROW + 0, VMSTATCOL + 10, "forks");
mvprintw(VMSTATROW + 1, VMSTATCOL + 10, "fkppw");
mvprintw(VMSTATROW + 2, VMSTATCOL + 10, "fksvm");
@@ -371,6 +376,11 @@ showkre(void)
s.nchcount = nchtotal.ncs_goodhits + nchtotal.ncs_badhits +
nchtotal.ncs_miss + nchtotal.ncs_long;
+ if (LINES - 1 > VMSTATROW + 17)
+ putint(sum.ifc_ip, VMSTATROW + 17, INTSCOL, 8);
+ if (LINES - 1 > VMSTATROW + 18)
+ putint(sum.ifc_op, VMSTATROW + 18, INTSCOL, 8);
+
psiz = 0;
f2 = 0.0;
@@ -465,6 +475,7 @@ showkre(void)
putfloat((nchtotal.ncs_miss + nchtotal.ncs_long - nchtotal.ncs_pass2) *
100.0 / nz(s.nchcount), NAMEIROW + 2, NAMEICOL + 45, 4, 0, 1);
#undef nz
+
}
int
@@ -693,6 +704,7 @@ read_vm(void)
if (state == TIME)
copyinfo(&s3, &s1);
fetchkre();
+ fetchifstat();
if (state == TIME)
dkswap();
num_disp = 0;