diff options
author | clive <clive@FreeBSD.org> | 2006-03-28 19:50:41 +0800 |
---|---|---|
committer | clive <clive@FreeBSD.org> | 2006-03-28 19:50:41 +0800 |
commit | c307ddc967e38eacbbf05ae902a0db80dae5b230 (patch) | |
tree | 9258039f4e76ed2e498a1ac654444a0448f41604 /sysutils | |
parent | 977cbfd3cf157327b1246256fb024f209aa3c254 (diff) | |
download | freebsd-ports-gnome-c307ddc967e38eacbbf05ae902a0db80dae5b230.tar.gz freebsd-ports-gnome-c307ddc967e38eacbbf05ae902a0db80dae5b230.tar.zst freebsd-ports-gnome-c307ddc967e38eacbbf05ae902a0db80dae5b230.zip |
Fix swap stat gathering.
Approved by: MAINTAINER
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/symon/Makefile | 2 | ||||
-rw-r--r-- | sysutils/symon/files/patch-platform__FreeBSD__sm_mem.c | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/sysutils/symon/Makefile b/sysutils/symon/Makefile index a45ab3b2d5ba..8ca00ff8350e 100644 --- a/sysutils/symon/Makefile +++ b/sysutils/symon/Makefile @@ -7,7 +7,7 @@ PORTNAME= symon PORTVERSION= 2.72 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://www.xs4all.nl/~wpd/symon/philes/ diff --git a/sysutils/symon/files/patch-platform__FreeBSD__sm_mem.c b/sysutils/symon/files/patch-platform__FreeBSD__sm_mem.c new file mode 100644 index 000000000000..8a5730a27683 --- /dev/null +++ b/sysutils/symon/files/patch-platform__FreeBSD__sm_mem.c @@ -0,0 +1,18 @@ +--- platform/FreeBSD/sm_mem.c.orig Mon Mar 27 06:06:18 2006 ++++ platform/FreeBSD/sm_mem.c Mon Mar 27 06:45:54 2006 +@@ -131,12 +131,12 @@ + } + for (i = 0; i < vmnswp_dat; i++) { + struct xswdev vmiswp_dat; +- int vmiswp_siz; ++ int vmiswp_siz = sizeof vmiswp_dat; + me_vmiswp_mib_nam[me_vmiswp_mib_len] = i; + if (sysctl(me_vmiswp_mib_nam, me_vmiswp_mib_len + 1, &vmiswp_dat, (void *)&vmiswp_siz, NULL, 0) < 0) + continue; +- me_stats[3] += (vmiswp_dat.xsw_used * DEV_BSIZE); +- me_stats[4] += (vmiswp_dat.xsw_nblks * DEV_BSIZE); ++ me_stats[3] += pagetob(vmiswp_dat.xsw_used); ++ me_stats[4] += pagetob(vmiswp_dat.xsw_nblks); + } + #endif + |