From rafan@svm.csie.ntu.edu.tw  Tue Sep 18 13:12:55 2007
Return-Path: <rafan@svm.csie.ntu.edu.tw>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CD2F16A46B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Sep 2007 13:12:55 +0000 (UTC)
	(envelope-from rafan@svm.csie.ntu.edu.tw)
Received: from svm.csie.ntu.edu.tw (svm.csie.ntu.edu.tw [140.112.90.75])
	by mx1.freebsd.org (Postfix) with ESMTP id 316EA13C480
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Sep 2007 13:12:54 +0000 (UTC)
	(envelope-from rafan@svm.csie.ntu.edu.tw)
Received: from svm.csie.ntu.edu.tw (localhost [127.0.0.1])
	by svm.csie.ntu.edu.tw (8.14.1/8.14.1) with ESMTP id l8IDCrPe014133;
	Tue, 18 Sep 2007 21:12:53 +0800 (CST)
	(envelope-from rafan@svm.csie.ntu.edu.tw)
Received: (from rafan@localhost)
	by svm.csie.ntu.edu.tw (8.14.1/8.14.1/Submit) id l8IDCrmh047038;
	Tue, 18 Sep 2007 21:12:53 +0800 (CST)
	(envelope-from rafan)
Message-Id: <200709181312.l8IDCrmh047038@svm.csie.ntu.edu.tw>
Date: Tue, 18 Sep 2007 21:12:53 +0800 (CST)
From: Rong-En Fan <rafan@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: kuriyama@freebsd.org
Subject: [PATCH] net-mgmt/net-snmp: count inactive memory as cache
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         116437
>Category:       ports
>Synopsis:       [PATCH] net-mgmt/net-snmp: count inactive memory as cache
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kuriyama
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 18 13:20:01 GMT 2007
>Closed-Date:    Sun Mar 30 08:14:00 UTC 2008
>Last-Modified:  Sun Mar 30 08:20:00 UTC 2008
>Originator:     Rong-En Fan
>Release:        FreeBSD 6.2-STABLE amd64
>Organization:
NTU CSIE
>Environment:
System: FreeBSD svm.csie.ntu.edu.tw 6.2-STABLE FreeBSD 6.2-STABLE #1: Sat Jul 14 14:31:49 CST 2007
>Description:
According to FAQ:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#TOP-FREEMEM

Inactive pages are a kind of cache memory. So count them as cache
under UCD-SNMP mib's memory section. This makes monitoring software
happy (like nagios's check_snmp_mem.pl).

Port maintainer (kuriyama@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- net-snmp-5.3.1_4.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/net-snmp/Makefile,v
retrieving revision 1.142
diff -u -u -r1.142 Makefile
--- Makefile	4 Aug 2007 11:41:13 -0000	1.142
+++ Makefile	18 Sep 2007 13:15:30 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	snmp
 PORTVERSION=	5.3.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	net-mgmt ipv6
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	net-snmp
Index: files/patch-memory_freebsd2.c
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/net-snmp/files/patch-memory_freebsd2.c,v
retrieving revision 1.6
diff -u -u -r1.6 patch-memory_freebsd2.c
--- files/patch-memory_freebsd2.c	3 Mar 2007 13:00:16 -0000	1.6
+++ files/patch-memory_freebsd2.c	18 Sep 2007 13:15:30 -0000
@@ -9,3 +9,12 @@
  
  #ifdef BUFSPACE_SYMBOL
      long            bufspace;
+@@ -352,7 +352,7 @@
+ #ifdef darwin
+         long_ret = ptok(mem.v_lookups);
+ #else
+-        long_ret = ptok(mem.v_cache_count);
++        long_ret = ptok(mem.v_cache_count) + ptok(mem.v_inactive_count);
+ #endif
+         return ((u_char *) (&long_ret));
+ #endif
--- net-snmp-5.3.1_4.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->kuriyama 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Sep 18 13:20:09 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116437 

From: "Michael W. Lucas" <mwlucas@blackhelicopters.org>
To: bug-followup@FreeBSD.org, rafan@FreeBSD.org
Cc:  
Subject: Re: ports/116437: [PATCH] net-mgmt/net-snmp: count inactive memory as cache
Date: Mon, 3 Mar 2008 14:30:44 -0500

 Tested this change against net-snmp net-snmp-5.3.2_1 on amd64.  Works
 correctly on 64-bit system.
 
 (Patch is now obsolete with change from 5.3.1 to 5.3.2, but the change
 to memory_freebsd2.c works as advertised and seems to be very sensible.)
 
 ==ml
 
 -- 
 Michael W. Lucas 	mwlucas@BlackHelicopters.org, mwlucas@FreeBSD.org
 		http://www.BlackHelicopters.org/~mwlucas/
       Now Shipping: "Absolute FreeBSD" -- http://www.AbsoluteFreeBSD.com
 On 5/4/2007, the TSA kept 3 pairs of my soiled undies "for security reasons."
State-Changed-From-To: open->closed 
State-Changed-By: kuriyama 
State-Changed-When: Sun Mar 30 08:13:48 UTC 2008 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116437 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/116437: commit references a PR
Date: Sun, 30 Mar 2008 08:13:46 +0000 (UTC)

 kuriyama    2008-03-30 08:13:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/net-snmp    Makefile 
     net-mgmt/net-snmp/files patch-configure.in 
   Added files:
     net-mgmt/net-snmp/files patch-memory_freebsd2.c 
   Log:
   - Remove unused dependency.
   - Remove unused message about WITH_INETADDRESS_HACK knob.
   - Count inactive memory as cache [1].
   
   PR:             ports/116437 [1]
   Submitted by:   rafan [1]
   
   Revision  Changes    Path
   1.152     +7 -9      ports/net-mgmt/net-snmp/Makefile
   1.6       +0 -38     ports/net-mgmt/net-snmp/files/patch-configure.in
   1.8       +11 -0     ports/net-mgmt/net-snmp/files/patch-memory_freebsd2.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
