diff options
author | 1998-06-12 22:09:23 +0000 | |
---|---|---|
committer | 1998-06-12 22:09:23 +0000 | |
commit | 986f6ea93f231be5248094fa84ec17ed02122bf6 (patch) | |
tree | 105e4bd68d70f204c8692b5b9e086b257c816769 /usr.bin/systat/vmstat.c | |
parent | back out some signal changes that can cause mail to hang when quitting due to SIGCHLD blockage (diff) | |
download | wireguard-openbsd-986f6ea93f231be5248094fa84ec17ed02122bf6.tar.xz wireguard-openbsd-986f6ea93f231be5248094fa84ec17ed02122bf6.zip |
fix vm load display
Diffstat (limited to 'usr.bin/systat/vmstat.c')
-rw-r--r-- | usr.bin/systat/vmstat.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 2c5c5aa521e..b556e7653c1 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.14 1997/12/19 09:34:46 deraadt Exp $ */ +/* $OpenBSD: vmstat.c,v 1.15 1998/06/12 22:09:23 marc Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif -static char rcsid[] = "$OpenBSD: vmstat.c,v 1.14 1997/12/19 09:34:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vmstat.c,v 1.15 1998/06/12 22:09:23 marc Exp $"; #endif /* not lint */ /* @@ -464,6 +464,16 @@ showkre() addch(cpuchar[c]); } + /* + * The above code does not account for time in the CP_INTR state. + * Thus the total may be less than 100%. If the total is less than + * the previous total old data may be left on the graph. The graph + * assumes one character position for every 2 percentage points for + * a total of 50 positions. Ensure all positions have been filled. + */ + while ( psiz++ <= 50 ) + addch(' '); + putint(ucount(), STATROW, STATCOL, 3); putfloat(avenrun[0], STATROW, STATCOL + 17, 6, 2, 0); putfloat(avenrun[1], STATROW, STATCOL + 23, 6, 2, 0); |