几年前,我把它用在了另一种系统上,但现在我不能让它工作了。我在Windows7 x64上使用Net 5.5 x64 (所有较晚的版本崩溃),并且我试图将施乐打印机(http://origin-download.support.xerox.com/pub/drivers/MIBs/)的.mib文件加载到其中,这样我就可以执行如下的调用
snmptranslate -m ALL -On XEROX-SERVICE-MONITORING-MIB::xcmSvcMonServiceStateDetail.27
我试图将asn文件夹中的文件放入我的share/snmp/mibs文件夹中,但是当我这样做时,会产生很大的错误,而且它不会进行查找。
Desktop>snmptranslate -m +XEROX-COMMON-MIB snmptranslate -m ALL -On XEROX-SERVICE-MONITORING-MIB::xcmSvcMonServiceStateDetail.27
Cannot find module (IANA-CHARSET-MIB): At line 23 inC:/usr/share/snmp/mibs/xerox.one
Cannot find module (Job-Monitoring-MIB): At line 32 in C:/usr/share/snmp/mibs/xerox.one
Cannot find module (Printer-MIB): At line 41 in C:/usr/share/snmp/mibs/xerox.one
Did not find 'IANACharset' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobEntry' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobState' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobStateReasons1' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmNumberOfInterveningJobs' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobKOctetsPerCopyRequested' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobKOctetsProcessed' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobImpressionsPerCopyRequested' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'jmJobImpressionsCompleted' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'PresentOnOff' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'prtGeneralEntry' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'prtInputEntry' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'prtOutputEntry' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'prtChannelEntry' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'prtInterpreterEntry' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Did not find 'prtInterpreterIndex' in module #-1 (C:/usr/share/snmp/mibs/xerox.one)
Unlinked OID in XEROX-COMMON-MIB: mib-2 ::= { mgmt 1 }
Undefined identifier: mgmt near line 38532 of C:/usr/share/snmp/mibs/xerox.one
snmptranslate: (Sub-id not found: (top) -> snmptranslate)
任何帮助都将不胜感激。
发布于 2015-07-29 09:06:23
尝试net-snmp-config --default-mibdirs
查看当前搜索路径。
而且,如果这与您所期望的不同,您可以尝试将-M +C:/usr/share/snmp/mibs
和-m ALL
添加到snmptranslate
命令中,以在C:/usr/share/snmp/mibs
中添加任何MIB。
man snmpcmd
显示
snmpcmd - options and behaviour common to most of the Net-SNMP command-line tools
//狙击
-m MIBLIST
Specifies a colon separated list of MIB modules (not files) to load for this application. This overrides (or augments) the environment variable MIBS, the snmp.conf
directive mibs, and the list of MIBs hardcoded into the Net-SNMP library.
If MIBLIST has a leading '-' or '+' character, then the MIB modules listed are loaded in addition to the default list, coming before or after this list respectively.
Otherwise, the specified MIBs are loaded instead of this default list.
The special keyword ALL is used to load all MIB modules in the MIB directory search list. Every file whose name does not begin with "." will be parsed as if it were a
MIB file.
-M DIRLIST
Specifies a colon separated list of directories to search for MIBs. This overrides (or augments) the environment variable MIBDIRS, the snmp.conf directive mibdirs,
and the default directory hardcoded into the Net-SNMP library (/usr/share/snmp/mibs).
If DIRLIST has a leading '-' or '+' character, then the given directories are added to the default list, being searched before or after the directories on this list
respectively. Otherwise, the specified directories are searched instead of this default list.
Note that the directories appearing later in the list have have precedence over earlier ones. To avoid searching any MIB directories, set the MIBDIRS environment
variable to the empty string ("").
Note that MIBs specified using the -m option or the mibs configuration directive will be loaded from one of the directories listed by the -M option (or equivalents).
The mibfile directive takes a full path to the specified MIB file, so this does not need to be in the MIB directory search list.
https://stackoverflow.com/questions/31685288
复制相似问题