From: SourceForge.net <no...@so...> - 2006-11-24 14:36:47
|
Bugs item #1602286, was opened at 2006-11-24 11:18 Message generated for change (Comment added) made by tcdiem You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1602286&group_id=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: Theo Cabrerizo Diem (tcdiem) Assigned to: Nobody/Anonymous (nobody) Summary: includeAllDisks triggers errors on FreeBSD Initial Comment: Problem trying to use includeAllDisks config option on FreeBSD boxes. After including the affected option, try to make a snmpwalk on UCD-SNMP-MIB::dskTable. On the agent side (running snmpd with -Le -D -f) I got : Received SNMP packet(s) from UDP: [X.X.X.X]:64665 GETNEXT message -- UCD-SNMP-MIB::dskTotal.1 Couldn't open device /dev/da0s1b statvfs dev/disk: No such file or directory ... (same message for other OIDs inside dskTable table) The mentioned partition exists and it is accessible but it's a swap partition. (seems to be a FreeBSD behavior to include them, I'm not a *BSD expert so I can't comment on this) All entries on dskTotal, dskAvail, dskUsed, dskPercent, dsk, PercentNode, dskErrorFlag and dskErrorMsg after the corresponding index of the 'missing' partition gets ignored (as you can see on the attached snmpwalk example) I've tried to build net-snmp on FreeBSD 4.10 , 4.11, 5.X and 6.X using ports tree (net-snmp 5.2.3) and building manually (net-snmp 5.2.3, net-snmp 5.3.1 , with no parameters to ./configure) and all them shared this problem. -- snmpwalk ------- 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 UCD-SNMP-MIB::dskIndex.8 = INTEGER: 8 UCD-SNMP-MIB::dskIndex.9 = INTEGER: 9 UCD-SNMP-MIB::dskIndex.10 = INTEGER: 10 UCD-SNMP-MIB::dskPath.1 = STRING: / UCD-SNMP-MIB::dskPath.2 = STRING: none UCD-SNMP-MIB::dskPath.3 = STRING: /export UCD-SNMP-MIB::dskPath.4 = STRING: /tmp UCD-SNMP-MIB::dskPath.5 = STRING: /usr UCD-SNMP-MIB::dskPath.6 = STRING: /var UCD-SNMP-MIB::dskPath.7 = STRING: /cdrom UCD-SNMP-MIB::dskPath.8 = STRING: /proc UCD-SNMP-MIB::dskPath.9 = STRING: /dbdata UCD-SNMP-MIB::dskPath.10 = STRING: /compat/linux/proc UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/da0s1a UCD-SNMP-MIB::dskDevice.2 = STRING: /dev/da0s1b UCD-SNMP-MIB::dskDevice.3 = STRING: /dev/da0s1h UCD-SNMP-MIB::dskDevice.4 = STRING: /dev/da0s1f UCD-SNMP-MIB::dskDevice.5 = STRING: /dev/da0s1g UCD-SNMP-MIB::dskDevice.6 = STRING: /dev/da0s1e UCD-SNMP-MIB::dskDevice.7 = STRING: /dev/acd0c UCD-SNMP-MIB::dskDevice.8 = STRING: proc UCD-SNMP-MIB::dskDevice.9 = STRING: /dev/da1s1h UCD-SNMP-MIB::dskDevice.10 = STRING: linprocfs UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 100000 UCD-SNMP-MIB::dskMinimum.2 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.3 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.4 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.5 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.6 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.7 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.8 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.9 = INTEGER: -1 UCD-SNMP-MIB::dskMinimum.10 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.2 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.3 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.4 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.5 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.6 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.7 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.8 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.9 = INTEGER: -1 UCD-SNMP-MIB::dskMinPercent.10 = INTEGER: -1 UCD-SNMP-MIB::dskTotal.1 = INTEGER: 1032142 UCD-SNMP-MIB::dskAvail.1 = INTEGER: 380600 UCD-SNMP-MIB::dskUsed.1 = INTEGER: 568972 UCD-SNMP-MIB::dskPercent.1 = INTEGER: 60 UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 5 UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 0 UCD-SNMP-MIB::dskErrorMsg.1 = STRING: ---------------------------------------------------------------------- >Comment By: Theo Cabrerizo Diem (tcdiem) Date: 2006-11-24 12:36 Message: Logged In: YES user_id=446472 Originator: YES About the problem of not continuing with the other devices after the error, I just found something : agent/mibgroup/ucd-snmp/disk.c : lines 695-700 : { snmp_log(LOG_ERR, "Couldn't open device %s\n", disks[disknum].device); setPerrorstatus("statvfs dev/disk"); return NULL; } Wouldn't returning a NULL flag as 'end of the MIB/Table' to snmpwalk ? Returning some bogus value (I know, it's wrong - but taking care to not mix float* and chat* <used on the ErrorMsg>) seems to display the remaining disks (with correct values), which also points that this problem must happen only with those swap partitions. This actually doesn't solve the problem, but might help. My knowledge on C is somewhat limited, so I can't debug too further than this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1602286&group_id=12694 |