about the snmpagent example
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Good,all I'm doing some job with the NET-SNMP upon Linux.But there is something strange arised. I wanted to write a MIB module of my own,but i didn't know how to start with it. So i followed the tutorial in the web site: http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_MIB_Module. As this is an example of how to write a MIB module. Then I've done the job as follows: Firstly,I've downloaded the MIB named "NET-SNMP-TUTORIAL-MIB" from the web site,then I put this .txt file into the directory:/usr/local/share/ snmp/mibs; Then i've downloaded "example mib module"(nstAgentModuleObject.c) and "header file"(nstAgentModuleObject.h ) and put them into the directory:/usr/ local/src/net-snmp-5.1.4/agent/mibgroup. Secondly,I entered the commands in the terminal as follows: # export MIBS=ALL # ./configure --with-mib-modules="nstAgentModuleObject" # make # make install Then when i asked for a snmptranslate command,it gave me the right result: # snmptranslate -On NET-SNMP-TURORIAL-MIB::nstAgentModuleObject.0 .1.3.6.1.4.1.8072.2.4.1.1.1.0 but when i asked for a snmpget command,it gave me the result: # snmpget -v 2c -c public localhost NET-SNMP-TUTORIAL- MIB::nstAgentModuleObject.0 NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0=No Such Object available on this agent at this OID Why?Why it didn't return the correct value to me?Is there anything important I ignored? But when i entered the command as follows,it gave me the correct value: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (54705) 0:09:07.05 Could you help me? Thanks in advance! Looking forward to your help! ------------------------------------------------------------------- 想玩得精彩?快来惠普"我的电脑 我的舞台"( http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2008/mail_zhuiyu_20080505.html ) ------------------------------------------------------------------- 注册新浪2G免费邮箱(http://mail.sina.com.cn/) ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users