Date: Sat, 11 Feb 2012 22:19:33 +0400 From: "Alexey Kouznetsov" <alexey@kouznetsov.com> To: <zi@FreeBSD.org>, <net@FreeBSD.org> Subject: FW: [ net-snmp-Bugs-3480541 ] Wrong index of disk (dskIndex) Message-ID: <D1BB55D7D7404898AD10C68C27F0EB25@your89ebba6db9>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1BB55D7D7404898AD10C68C27F0EB25>