Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2012 11:17:55 -0500
From:      Ryan Steinmetz <zi@freebsd.org>
To:        Alexey Kouznetsov <alexey@kouznetsov.com>
Cc:        net@freebsd.org
Subject:   Re: Fwd: FW: [ net-snmp-Bugs-3480541 ] Wrong index of disk (dskIndex)
Message-ID:  <20120213161755.GA59841@fast.rit.edu>
In-Reply-To: <CAGd9aGD4r2YK7oVbvc45x_vwKm3aFLSKx_0hkKqQK5ojS3p7xA@mail.gmail.com>
References:  <D1BB55D7D7404898AD10C68C27F0EB25@your89ebba6db9> <CAGd9aGD4r2YK7oVbvc45x_vwKm3aFLSKx_0hkKqQK5ojS3p7xA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <alexey@kouznetsov.com>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120213161755.GA59841>