2013/3/5 Meike Stone <meike.st...@googlemail.com>:
> 2013/3/1 Lee <ler...@gmail.com>:
>> Adding a display-hint to the mib file might work.  But with snmptrapd
>> printing out
>>> 22#011.1.3.6.1.4.1.45.1.6.5.3.12.1.3.1.22 = "`s\\/c("
>> it doesn't look like it's found the mibs.
>
> strace -f -eopen snmptrapd -nf
> .
> .
> .
> pen("/etc/snmp/snmp.local.conf", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/share/snmp/snmp.conf", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/share/snmp/snmp.local.conf", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/var/lib/net-snmp/snmp.conf", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/var/lib/net-snmp/snmp.local.conf", O_RDONLY) = -1 ENOENT (No
> such file or directory)
> open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 7
> open("/root/.snmp/mibs", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =
> -1 ENOENT (No such file or directory)
> open("/usr/share/snmp/mibs/.index", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/UCD-IPFWACC-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/SNMPv2-TC.txt", O_RDONLY) = 8
> open("/usr/share/snmp/mibs/UCD-SNMP-MIB.txt", O_RDONLY) = 8
> open("/usr/share/snmp/mibs/SNMPv2-SMI.txt", O_RDONLY) = 9
> open("/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/EtherLike-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/IF-MIB.txt", O_RDONLY) = 8
> open("/usr/share/snmp/mibs/SNMPv2-MIB.txt", O_RDONLY) = 9
> open("/usr/share/snmp/mibs/IANAifType-MIB.txt", O_RDONLY) = 9
> open("/usr/share/snmp/mibs/RMON-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/VELOCITY-MIB.txt", O_RDONLY) = 7
> .
> .
> .
>
>
>> The default  location for the mib files is /usr/local/share/snmp/mibs
> Here on SLES11 it is /usr/share/snmp/mibs/
>
>> In any case, once you've got snmptrapd reading the mibs try adding
>>  DISPLAY-HINT "2x:"
>
> I found a display-hint in SNMPv2-TC.txt:
>
> MacAddress ::= TEXTUAL-CONVENTION
>     DISPLAY-HINT "1x:"
>     STATUS       current
>     DESCRIPTION
>             "Represents an 802 MAC address represented in the
>             `canonical' order defined by IEEE 802.1a, i.e., as if it
>             were transmitted least significant bit first, even though
>             802.5 (in contrast to other 802.x protocols) requires MAC
>             addresses to be transmitted most significant bit first."
>     SYNTAX       OCTET STRING (SIZE (6))
>
> This file is loaded, see strace above.
.. and I started snmptrapd -nf -DALL, here the part from the syslog:

Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: Parsing file:
/usr/share/snmp/mibs/SNMPv2-TC.txt...
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse(): parse.c, 4345:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: Parsing MIB: 7 SNMPv2-TC
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1677:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: Processing IMPORTS for
module 7 SNMPv2-TC
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1690:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]:   Processing import: joint-iso-ccitt
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1690:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]:   Processing import: ccitt
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1690:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]:   Processing import: iso
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse(): parse.c, 4462:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-file:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: End of file
(/usr/share/snmp/mibs/SNMPv2-TC.txt)


>
> Hmm,..
>
> Thanks Meike

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to