summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-12-23 17:46:32 +0000
committeryar <yar@FreeBSD.org>2006-12-23 17:46:32 +0000
commit9729f09883a8c7873bbe4f9e5c12decfdbfba09c (patch)
tree33b108b3a475abaa0320c41dca569ed6b2d252f1 /usr.bin/systat
parent15acdf0cd35f81e0eb5f2a44258a99565f5d6e0a (diff)
downloadFreeBSD-src-9729f09883a8c7873bbe4f9e5c12decfdbfba09c.zip
FreeBSD-src-9729f09883a8c7873bbe4f9e5c12decfdbfba09c.tar.gz
Make it possible for meter to reach 100% mark when swap is totally full.
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c
index b9ec856..21f457d 100644
--- a/usr.bin/systat/swap.c
+++ b/usr.bin/systat/swap.c
@@ -186,7 +186,7 @@ showswap()
wprintw(wnd, "%*d", hlen, CONVERT(kvmsw[i].ksw_total));
wprintw(wnd, "%*d", ulen, CONVERT(kvmsw[i].ksw_used));
- count = (double)kvmsw[i].ksw_used * 49.999 / kvmsw[i].ksw_total;
+ count = 50.0 * kvmsw[i].ksw_used / kvmsw[i].ksw_total + 1;
waddch(wnd, ' ');
while (count--)
OpenPOWER on IntegriCloud