quake_kkk
驱动牛犊
驱动牛犊
  • 注册日期2002-08-15
  • 最后登录2004-04-01
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2032回复:1

MIB扩展问题

楼主#
更多 发布于:2002-08-24 14:14
问题如下:
/usr/local/src/ucd-snmp-4.2.5/mibs
/usr/local/share/snmp/mibs
/usr/share/snmp/mibs
三个目录都已经有UCD-SNMP-TUTORIAL-MIB.txt

/usr/local/src/ucd-snmp-4.2.5/agent/mibgroup
目录下有ustScalarSet.c & ustScalarSet.h
注::ustScalarSet.c & ustScalarSet.h 是由下面的命令生成的(我已经配置了perl/SNMP模块):
# mib2c -f ustScalarSet UCD-SNMP-TUTORIAL-MIB.txt

我重新编译ucd-snmp-4.2.5(遵照INSTALL):
# ./configure -with-mib-modules=\"ustScalarSet\"
# make
# umask 022 # <-- zero-two-two
# make install
# make clean

运行snmpd,然后
# snmpwalk localhost public UCD-SNMP-TUTORIAL-MIB::ustScalarSet
(no any output)
# snmpwalk localhost public UCD-SNMP-TUTORIAL-MIB::ustScalarSet# snmpget localhost public UCD-SNMP-TUTORIAL-MIB::ustSSSimpleString.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: enterprises.ucdavis.ucdExperimental.ucdSnmpTutorialMIB.ustMIBObjects.ustScalarSet.ustSSSimpleString.0

请问这是怎么回事啊?如何解决。怎么还是不支持啊?

附:UCD-SNMP-TUTORIAL-MIB.txt
------------------------------------------------------------
-- UCD-SNMP-TUTORIAL-MIB.txt

UCD-SNMP-TUTORIAL-MIB DEFINITIONS ::= BEGIN
IMPORTS
ucdExperimental FROM UCD-SNMP-MIB,
MODULE-IDENTITY FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;

ucdSnmpTutorialMIB MODULE-IDENTITY
LAST-UPDATED \"0005150000Z\"
ORGANIZATION \"UCDavis\"
CONTACT-INFO \"
Author: Wes Hardaker
University of California at Davis
postal: IT-DCAS
UCDavis
Davis, CA 95616
USA
email: wjhardaker@ucdavis.edu
phone: +1-530-754-7571
\"
DESCRIPTION \"A simple mib for demonstration purposes.
\"
::= { ucdExperimental 4242 }

ustMIBObjects OBJECT IDENTIFIER ::= { ucdSnmpTutorialMIB 1 }
ustMIBConformance OBJECT IDENTIFIER ::= { ucdSnmpTutorialMIB 2 }

ustScalarSet OBJECT IDENTIFIER ::= { ustMIBObjects 1 }

ustSSSimpleString OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
\"This is a simple test string. It does nothing more than
return its current value, and changes values only when set by
an incoming SNMP set request.\"
DEFVAL { Hello World }
::= { ustScalarSet 1 }

ustSSSecondsSinceChanged OBJECT-TYPE
SYNTAX TimeTicks
UNITS \"1/100th Seconds\"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
\"This object indicates the number of 1/100th seconds since the
ustSSSimpleString object has changed. If it is has never been
modified, it will be the time passed since the start of the
agent.\"
::= { ustScalarSet 2 }

END
------------------------------------------------------------
quake_kkk
驱动牛犊
驱动牛犊
  • 注册日期2002-08-15
  • 最后登录2004-04-01
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-08-25 12:01
root@hfw bin]# snmpwalk localhost public ucdExperimental
enterprises.ucdavis.ucdExperimental.ucdDlmodMIB.dlmodNextIndex.0 = 1
[root@hfw bin]# snmpwalk localhost public ucdExperimental.ucdSnmpTutorialMIB
ucdExperimental.ucdSnmpTutorialMIB:Unknown Object Identifier (Sub-id not found: ucdExperimental -> ucdSnmpTutorialMIB)
而在UCD-SNMP-TOTURIAL-MIB.txt中有以下语句:
IMPORTS
ucdExperimental FROM UCD-SNMP-MIB,
......
ucdSnmpTutorialMIB MODULE-IDENTITY
......
::= { ucdExperimental 4242 }

请问怎么会这样啊?救命啊!
游客

返回顶部