From owner-freebsd-net@FreeBSD.ORG Sat Feb 11 18:19:40 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 86E16106564A; Sat, 11 Feb 2012 18:19:40 +0000 (UTC) (envelope-from alexey@kouznetsov.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id DF3788FC08; Sat, 11 Feb 2012 18:19:39 +0000 (UTC) Received: by bkcjg1 with SMTP id jg1so3333233bkc.13 for ; Sat, 11 Feb 2012 10:19:38 -0800 (PST) Received: by 10.204.154.14 with SMTP id m14mr2866675bkw.38.1328984378389; Sat, 11 Feb 2012 10:19:38 -0800 (PST) Received: from your89ebba6db9 ([77.41.97.165]) by mx.google.com with ESMTPS id o26sm28924945bko.14.2012.02.11.10.19.36 (version=SSLv3 cipher=OTHER); Sat, 11 Feb 2012 10:19:37 -0800 (PST) From: "Alexey Kouznetsov" To: , Date: Sat, 11 Feb 2012 22:19:33 +0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Aczo6TDC5mkYPw7sTNOizM7GCkH49QAACwgg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Gm-Message-State: ALoCoQkYpeOBBJBoF8A20cJPrx/V9Vr6zmKX0J4r7I2TKavlRygJ9d+5fdhc9/O/Z58l+xJyKPzd Cc: Subject: 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: Sat, 11 Feb 2012 18:19:40 -0000 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