diff options
author | sylvio <sylvio@FreeBSD.org> | 2010-07-04 22:44:16 +0800 |
---|---|---|
committer | sylvio <sylvio@FreeBSD.org> | 2010-07-04 22:44:16 +0800 |
commit | 255f333a5d4036a93655f9d479e387847d9fcca6 (patch) | |
tree | d74ded39138e37d94457fc0e55c64a88b0de9a9c /net-mgmt | |
parent | ddaa452bd30eb1bf22976e69afd83139eb174eb6 (diff) | |
download | freebsd-ports-gnome-255f333a5d4036a93655f9d479e387847d9fcca6.tar.gz freebsd-ports-gnome-255f333a5d4036a93655f9d479e387847d9fcca6.tar.zst freebsd-ports-gnome-255f333a5d4036a93655f9d479e387847d9fcca6.zip |
- Fixed inactive memory should be treated as cached memory instead of used memory.
- BUMP PORTREVISION
PR: ports/148339
Submitted by: Helmut Schneider <jumper99@gmx.de>
Feature safe: yes
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/net-snmp/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-memory_freebsd.c | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile index 9d0d180169f9..12a44a12f445 100644 --- a/net-mgmt/net-snmp/Makefile +++ b/net-mgmt/net-snmp/Makefile @@ -7,7 +7,7 @@ PORTNAME= snmp PORTVERSION= 5.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt ipv6 MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} PKGNAMEPREFIX= net- diff --git a/net-mgmt/net-snmp/files/patch-memory_freebsd.c b/net-mgmt/net-snmp/files/patch-memory_freebsd.c index 907d1249740c..3dc734a29435 100644 --- a/net-mgmt/net-snmp/files/patch-memory_freebsd.c +++ b/net-mgmt/net-snmp/files/patch-memory_freebsd.c @@ -1,6 +1,6 @@ ---- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2008-05-28 14:48:46.000000000 +0300 -+++ agent/mibgroup/hardware/memory/memory_freebsd.c 2010-06-27 15:19:27.000000000 +0300 -@@ -43,9 +43,12 @@ +--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2010-06-29 12:34:48.000000000 +0200 ++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2010-07-01 13:32:34.000000000 +0200 +@@ -43,10 +43,15 @@ u_long phys_mem; u_long user_mem; @@ -8,24 +8,28 @@ + unsigned int cache_max; unsigned int bufspace; unsigned int maxbufspace; ++ unsigned int inact_count; size_t mem_size = sizeof(phys_mem); + size_t cache_size = sizeof(cache_count); size_t buf_size = sizeof(bufspace); ++ size_t inact_size = sizeof(inact_count); int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM }; int user_mem_mib[] = { CTL_HW, HW_USERMEM }; -@@ -56,9 +59,10 @@ + +@@ -56,9 +61,11 @@ sysctl(total_mib, 2, &total, &total_size, NULL, 0); sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0); sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_count", &cache_count, &cache_size, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_max", &cache_max, &cache_size, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_inactive_count", &inact_count, &inact_size, NULL, 0); sysctlbyname("vfs.bufspace", &bufspace, &buf_size, NULL, 0); sysctlbyname("vfs.maxbufspace", &maxbufspace, &buf_size, NULL, 0); - auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem)); #ifndef freebsd4 pagesize = 1024; #else -@@ -75,7 +79,7 @@ +@@ -75,7 +82,7 @@ if (!mem->descr) mem->descr = strdup("Physical memory"); mem->units = pagesize; @@ -34,7 +38,7 @@ mem->free = total.t_free; } -@@ -129,9 +133,9 @@ +@@ -129,9 +136,9 @@ } else { if (!mem->descr) mem->descr = strdup("Cached memory"); @@ -42,7 +46,7 @@ - mem->size = vmem.v_cache_max; - mem->free = vmem.v_cache_max - vmem.v_cache_count; + mem->units = pagesize; -+ mem->size = cache_max; ++ mem->size = cache_max + inact_count; + mem->free = cache_max - cache_count; } |