about the snmpagent example

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
&nbsp;
Good,all 


&nbsp;

I'm doing some job with the NET-SNMP upon Linux.But there is something 
strange arised. 


&nbsp;

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: 


&nbsp;

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. 


&nbsp;

Secondly,I entered the commands in the terminal as follows: 
# export MIBS=ALL 
# ./configure --with-mib-modules="nstAgentModuleObject" 
# make 
# make install 


&nbsp;

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 


&nbsp;

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 


&nbsp;

Why?Why it didn't return the correct value to me?Is there anything 
important I ignored? 


&nbsp;

But when i entered the command as follows,it gave me the correct 
value:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (54705) 0:09:07.05
&nbsp;
&nbsp;
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.