From owner-freebsd-net@FreeBSD.ORG Mon Feb 13 16:17:58 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30E0A106566B for ; Mon, 13 Feb 2012 16:17:58 +0000 (UTC) (envelope-from zi@freebsd.org) Received: from fast.rit.edu (fast.rit.edu [129.21.182.30]) by mx1.freebsd.org (Postfix) with ESMTP id F31138FC1B for ; Mon, 13 Feb 2012 16:17:57 +0000 (UTC) Received: from fast.rit.edu (localhost.rit.edu [127.0.0.1]) by fast.rit.edu (Postfix) with ESMTP id 45E871D2CB; Mon, 13 Feb 2012 11:17:57 -0500 (EST) X-Virus-Scanned: by amavisd-new at fast.rit.edu Received: from fast.rit.edu ([127.0.0.1]) by fast.rit.edu (fast.rit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JMoSZQj0EHC2; Mon, 13 Feb 2012 11:17:55 -0500 (EST) Received: from syn.rit.edu (syn.rit.edu [129.21.182.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fast.rit.edu (Postfix) with ESMTPS id E18AD1D2CA; Mon, 13 Feb 2012 11:17:55 -0500 (EST) Received: from syn.rit.edu (localhost.rit.edu [127.0.0.1]) by syn.rit.edu (8.14.4/8.14.3) with ESMTP id q1DGHtwK080172; Mon, 13 Feb 2012 11:17:55 -0500 (EST) (envelope-from zi@freebsd.org) Received: (from zi@localhost) by syn.rit.edu (8.14.4/8.14.3/Submit) id q1DGHtAG075244; Mon, 13 Feb 2012 11:17:55 -0500 (EST) (envelope-from zi@freebsd.org) Date: Mon, 13 Feb 2012 11:17:55 -0500 From: Ryan Steinmetz To: Alexey Kouznetsov Message-ID: <20120213161755.GA59841@fast.rit.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: net@freebsd.org Subject: Re: Fwd: FW: [ net-snmp-Bugs-3480541 ] Wrong index of disk (dskIndex) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 16:17:58 -0000 I've committed this to the port, however, did not bump PORTREVISION. I have a couple other open PRs that will most likely result in additional patch changes and I do not want to force people to update over and over if I can avoid it. To get the fix into your systems, simply update your ports tree and then rebuild/reinstall net-snmp. -r On (02/13/12 20:01), Alexey Kouznetsov wrote: > Hello! > > There are commited to net-snmp's GIT patch for problem bellow! > > Could you, please add this to the FreeBSD ports tree also! > > http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp/net-snmp;a=commitdiff;h=0fc8221b24988c4ae6180ed42b86b9852fd586ad > > Thank you! > /Alexey > > ---------- Forwarded message ---------- > From: Alexey Kouznetsov > Date: 2012/2/11 > Subject: FW: [ net-snmp-Bugs-3480541 ] Wrong index of disk (dskIndex) > To: zi@freebsd.org, net@freebsd.org > > > Hello! > Could you, please look at this also? > Explanation bellow at SF bug track > > --- work/net-snmp-5.7.1/agent/mibgroup/ucd-snmp/disk_hw.c.orig 2011-09-@@ > +++ work/net-snmp-5.7.1/agent/mibgroup/ucd-snmp/disk_hw.c 2012-02-11 > 21:55:16.000000000 +0400-322,7 +321,7 @@ > > switch (vp->magic) { > case MIBINDEX: > + long_ret = disknum + 1; > - long_ret = disknum; > return ((u_char *) (&long_ret)); > case ERRORNAME: /* DISKPATH */ > *var_len = strlen(entry->path); > > Thank you! > > -----Original Message----- > From: SourceForge.net [mailto:noreply@sourceforge.net] > Sent: Saturday, February 11, 2012 10:16 PM > To: SourceForge.net > Subject: [ net-snmp-Bugs-3480541 ] Wrong index of disk (dskIndex) > > Bugs item #3480541, was opened at 2012-01-27 05:47 > Message generated for change (Comment added) made by st-da > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3480541&group_i > d=12694 > > Please note that this message will contain a full copy of the comment > thread, > including the initial issue submission, for this request, > not just the latest update. > Category: agent > Group: freeBSD > Status: Open > Resolution: None > Priority: 5 > Private: No > Submitted By: Alexey (st-da) > Assigned to: Nobody/Anonymous (nobody) > Summary: Wrong index of disk (dskIndex) > > Initial Comment: > # snmpwalk -c public 127.0.0.1 dskIndex > > UCD-SNMP-MIB::dskIndex.1 = INTEGER: 0 > UCD-SNMP-MIB::dskIndex.2 = INTEGER: 1 > UCD-SNMP-MIB::dskIndex.3 = INTEGER: 2 > UCD-SNMP-MIB::dskIndex.4 = INTEGER: 3 > UCD-SNMP-MIB::dskIndex.5 = INTEGER: 4 > UCD-SNMP-MIB::dskIndex.6 = INTEGER: 5 > UCD-SNMP-MIB::dskIndex.7 = INTEGER: 6 > > > In my mind it have to be same mumbers in OID and in index > > UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1 > UCD-SNMP-MIB::dskIndex.2 = INTEGER: 2 > UCD-SNMP-MIB::dskIndex.3 = INTEGER: 3 > UCD-SNMP-MIB::dskIndex.4 = INTEGER: 4 > UCD-SNMP-MIB::dskIndex.5 = INTEGER: 5 > UCD-SNMP-MIB::dskIndex.6 = INTEGER: 6 > UCD-SNMP-MIB::dskIndex.7 = INTEGER: 7 > > > # /usr/local/sbin/snmpd -v > > NET-SNMP version: 5.7.1 > Web: http://www.net-snmp.org/ > Email: net-snmp-coders@lists.sourceforge.net > > recenly built from ports on FreeBSD 8.2 stable. Looks lite it started from > 5.7 and was correctly before. > > ---------------------------------------------------------------------- > > >Comment By: Alexey (st-da) > Date: 2012-02-11 10:15 > > Message: > ops reverse + and - at last patch... > > ---------------------------------------------------------------------- > > Comment By: Alexey (st-da) > Date: 2012-02-11 10:07 > > Message: > disk index fixed for me by small path: > > --- work/net-snmp-5.7.1/agent/mibgroup/ucd-snmp/disk_hw.c 2012-02-11 > 21:55:16.000000000 +0400 > +++ work/net-snmp-5.7.1/agent/mibgroup/ucd-snmp/disk_hw.c.orig 2011-09-@@ > -322,7 +321,7 @@ > > switch (vp->magic) { > case MIBINDEX: > - long_ret = disknum + 1; > + long_ret = disknum; > return ((u_char *) (&long_ret)); > case ERRORNAME: /* DISKPATH */ > *var_len = strlen(entry->path); > > > ---------------------------------------------------------------------- > > Comment By: Alexey (st-da) > Date: 2012-02-02 06:09 > > Message: > there are same requets sfter we clean up the disk > > > UCD-SNMP-MIB::dskTotal.4 = INTEGER: 50777034 > UCD-SNMP-MIB::dskAvail.4 = INTEGER: 36894232 > UCD-SNMP-MIB::dskUsed.4 = INTEGER: 9820640 > > > ---------------------------------------------------------------------- > > Comment By: Alexey (st-da) > Date: 2012-02-02 05:53 > > Message: > There are some more problem: > > df -k | egrep logs > /dev/aacd0s1g 50777034 46745456 -30584 100% /logs > > > /usr/local/bin/snmpwalk -c public xxxxxx dsk| egrep '\.4 = ' > UCD-SNMP-MIB::dskIndex.4 = INTEGER: 3 > UCD-SNMP-MIB::dskPath.4 = STRING: /logs > UCD-SNMP-MIB::dskDevice.4 = STRING: /dev/aacd0s1g > UCD-SNMP-MIB::dskMinimum.4 = INTEGER: 524288 > UCD-SNMP-MIB::dskMinPercent.4 = INTEGER: -1 > UCD-SNMP-MIB::dskTotal.4 = INTEGER: 50777034 > UCD-SNMP-MIB::dskAvail.4 = INTEGER: 2147483647 > UCD-SNMP-MIB::dskUsed.4 = INTEGER: 46745264 > UCD-SNMP-MIB::dskPercent.4 = INTEGER: 92 > UCD-SNMP-MIB::dskPercentNode.4 = INTEGER: 1 > UCD-SNMP-MIB::dskTotalLow.4 = Gauge32: 50777034 > UCD-SNMP-MIB::dskTotalHigh.4 = Gauge32: 0 > UCD-SNMP-MIB::dskAvailLow.4 = Gauge32: 4294936904 > UCD-SNMP-MIB::dskAvailHigh.4 = Gauge32: 4294967295 > UCD-SNMP-MIB::dskUsedLow.4 = Gauge32: 46745264 > UCD-SNMP-MIB::dskUsedHigh.4 = Gauge32: 0 > UCD-SNMP-MIB::dskErrorFlag.4 = INTEGER: noError(0) > UCD-SNMP-MIB::dskErrorMsg.4 = STRING: > > some unrealistic unavailable value > dskAvail.4 = INTEGER: 2147483647 > > Somethiong like unsigned where we save negative value ? > > FreeBSD 8.2-STABLE #9: Tue Oct 11 07:07:46 UTC 2011 > > pkg_info -aI | egrep snmp > net-snmp-5.7_4 An extendable SNMP implementation > > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3480541&group_i > d=12694 -- Ryan Steinmetz PGP: EF36 D45A 5CA9 28B1 A550 18CD A43C D111 7AD7 FAF2