Hi Dave, Thanks for your answer.
Here is what I modified in /etc/default/snmp: %diff /etc/default/snmpd /etc/default/snmpd.org ~ 11,14c11 < #SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid' < #SNMPDOPTS='-M /var/lib/mibs/ietf:/home/daniel/.snmp/mibs -m SNMPv2-SMI:TCS-MIB -LS7d -Dagent,handler,snmpd,parse-mibs,init_mib,mib_init -Lf /var/log/snmpd -u snmp -g snmp -I -smux -p /var/run/snmpd.pid' < SNMPDOPTS='-M /var/lib/mibs/ietf:/home/daniel/.snmp/mibs -m SNMPv2-SMI:TCS-MIB -LS7d -Dagent_handler,disman:event::mib,disman:expr::mib,disman:expr::val,expScalars,fixup_mib_directory,get_mib_directory,perl,snmp_agent,snmpd,snmpv3 -Lf /var/log/snmpd -u snmp -g snmp -I -smux -p /var/run/snmpd.pid' < #SNMPDOPTS='-Lsd -D ALL -LF d /var/log/snmpd -u snmp -g snmp -I -smux -p /var/run/snmpd.pid' --- > SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid' This merely was an attempt to get any useful log, which did not succeed, at least to my understanding Here is my /etc/snmp/snmp.conf #mibs : mibs +SNMPv2-SMI:TCS-MIB # tentative pour snmpwalk mibdirs +/home/daniel/.snmp/mibs #apporte rien mibdirs +/home/daniel/.snmp/mibs:/var/lib/mibs/ietf/ #pour le debug doDebugging 1 debugTokens agent/handler/snmpd Here are the changes I made to /etc/snmp/snmpd.conf % sudo diff /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org ~ 186,195d185 < #DC/20120525: ajout d'un agent TCS-MIB < doDebugging 1 < disablePerl false < pass 1.3.6.1.4.1.16304.3665 /usr/bin/perl /home/daniel/.snmp/mibs/tcs-agent-module.pl < perl print "salete d'extension perl snmp qui ne veut pas se lancer!\n"; < #perl do "/home/daniel/.snmp/mibs/tcs-agent-module.pl"; < perl 'do /home/daniel/.snmp/mibs/tcs-agent-module.pl'; < #DC/20120525: fin ajout These are various attempts to get the agent Here is the output when I walk iso % snmpwalk -v1 -c public localhost iso ~ SNMPv2-MIB::sysDescr.0 = STRING: Linux debian 2.6.32-5-686 #1 SMP Mon Mar 26 05:20:33 UTC 2012 i686 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (5429948) 15:04:59.48 SNMPv2-MIB::sysContact.0 = STRING: Me <m...@example.org> SNMPv2-MIB::sysName.0 = STRING: debian SNMPv2-MIB::sysLocation.0 = STRING: Sitting on the Dock of the Bay SNMPv2-MIB::sysServices.0 = INTEGER: 72 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (10) 0:00:00.10 SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB. SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching. SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model. SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP. SNMPv2-MIB::sysORUpTime.1 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.3 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.4 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.5 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.6 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.7 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.8 = Timeticks: (10) 0:00:00.10 HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (287043) 0:47:50.43 HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2012-6-6,10:12:3.0,+2:0 HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0 = INTEGER: 1536 HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=1aa19145-0fb8-4f80-9141-325bfc3d5c44 ro quiet " HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 3 HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 141 HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = INTEGER: 0 End of MIB It looks like I cannot query the Netsnmp private mib % snmpget -v1 -c public localhost 1.3.6.1.4.1.8072 ~ Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: NET-SNMP-MIB::netSnmp ...even though it appears when I translate the whole tree % snmptranslate -Tt | grep netSnmp ~ netSnmp(8072) type=24 netSnmpObjects(1) type=0 netSnmpExtendMIB(1) type=24 netSnmpVacmMIB(9) type=24 netSnmpExamples(2) type=24 netSnmpExampleScalars(1) type=0 netSnmpExampleInteger(1) type=16 netSnmpExampleSleeper(2) type=16 netSnmpExampleString(3) type=2 tc=49 hint=255t netSnmpExampleTables(2) type=0 <and about 30 more lines> But the following does not work: % snmptranslate -Tl netSnmp ~ netSnmp: Unknown Object Identifier (Sub-id not found: (top) -> netSnmp) Here is what I currently get for snmpget % snmpget -v1 -c public localhost sysDescr.0 ~ SNMPv2-MIB::sysDescr.0 = STRING: Linux debian 2.6.32-5-686 #1 SMP Mon Mar 26 05:20:33 UTC 2012 i686 % snmpget -v1 -c public localhost netSnmp ~ Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: NET-SNMP-MIB::netSnmp % snmpget -v1 -c public localhost tcs.0 ~ tcs.0: Unknown Object Identifier (Sub-id not found: (top) -> tcs) % snmpget -v1 -c public localhost tcsTestString.0 ~ tcsTestString.0: Unknown Object Identifier (Sub-id not found: (top) -> tcsTestString) Here is what I currently get for snmpgetnext and snmpwalk: % snmpgetnext -v1 -c public localhost tcs ~ tcs: Unknown Object Identifier (Sub-id not found: (top) -> tcs) % snmpwalk -v1 -c public localhost tcs ~ tcs: Unknown Object Identifier (Sub-id not found: (top) -> tcs) Here is what I currently get for snmptranslate: % snmptranslate -Td tcs ~ tcs: Unknown Object Identifier (Sub-id not found: (top) -> tcs) % snmptranslate -Td netSnmp ~ netSnmp: Unknown Object Identifier (Sub-id not found: (top) -> netSnmp) % snmptranslate -Td sysDescr ~ sysDescr: Unknown Object Identifier (Sub-id not found: (top) -> sysDescr) I also tried recompiling the last sources (5.7.1) yesterday evening, but 6 tests failed (concerning traps and com2sec, which I don't use AFAIK); and then I got " error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory" which was indeed true Thanks for your time. I was not aware that most volunteer support (or help) people on this list were from UK (well, I did not focus on e-mail addresses) and hence were luckily entitled for an extra (rainy as here?) day off due to the queen's jubilee. Daniel -----Message d'origine----- De : dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] De la part de Dave Shield Envoyé : mercredi 6 juin 2012 09:34 À : Chayvialle, Daniel (External) Cc : net-snmp-users@lists.sourceforge.net Objet : Re: Stuck in the way of quering a private MIB (extension using perl) On 1 June 2012 12:07, Chayvialle, Daniel (External) <daniel.chayvialle.exter...@cassidian.com> wrote: > I have a MIB file in ~/.snmp/mibs and a perl extension for the agent, that > is currently very close to what I could find on the Net. I have modiified > the /etc/default/snmp, /etc/snmp/snmp.conf and /etc/snmp/snmpd.conf as > understood from various tutorials How have you modified these files? What exactly have you put in them? > Everything works when I query for exemple sysUpTime.0. But I cannot access > my private MIB: What else _can_ you access? Try walking the whole tree - what do you see? Is it just the system group, or other things as well? Can you query the Net-SNMP enterprise-specific MIBs? i.e. is the problem *just* with your private MIB, or is it more widespread? > - snmpget says "No Such Instance currently exists at this OID" but can > give me the name What is the exact command that you are using? > - snmpwalk gives an empty content for the MIB when I ask from the top of > my private MIB What about snmpgetnext on the top of your MIB? That should return something - but what? > - snmptranslate says "Unknown Object Identifier (Sub-id not found : (top)" What is the exact command that you are using? If you try the same command with one of the Net-SNMP MIB objects, what do you get? Dave > Sorry if I posted twice the other day, I thought the first post didn't get > through. > Anyway, is there no-one who can give me even some slight advice about what to > look for? You posted your original query late on Friday (UK time) - i.e. after the end of the working day. You are always likely to experience a reduced level of response over the weekend - whether with commercial support or volunteer provided (like us). Now it happens that you picked a long bank holiday weekend in the UK, so I've been off work both Monday and Tuesday, and have only just got in. None of us are paid to support this project, and most of us have a life outside of computers - even if only sporadically! ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ 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