2015-07-28 3 views
1

Я получил это, чтобы работать много лет назад в другой системе, но я не могу заставить его работать сейчас. Я использую Net-SNMP 5.5 x64 на Windows 7 x64 (все более поздние версии аварии), и я пытаюсь загрузить файлы .mib для Xerox Принтеры (http://origin-download.support.xerox.com/pub/drivers/MIBs/) в него, так что я могу сделать звонки какNet-SNMP, добавляющий файлы .mib

Я попытался поместить эти файлы в папке ASN в моей доли/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) 

Любая помощь будет оценена ,

+0

Похоже, я сделал ошибку при тестировании и не помещал -он на месте. Так или иначе, если кто-то знает, как исправить эти ошибки, я был бы признателен. – user1652528

+0

snmptranslate -m + XEROX-COMMON-MIB snmptranslate -m ALL -On XEROX-SERVICE-MONITORING-MIB :: xcmSvcMonServiceStateDetail.27 Я исхожу из-за ошибки копирования/вставки из-за повторного «snmptranslate -m» – k1eran

ответ

2

Просьба net-snmp-config --default-mibdirs для просмотра текущих путей (ов) поиска.

И, если это по-другому, что вы ожидаете, вы можете попробовать добавить к вашей команде snmptranslate-M +C:/usr/share/snmp/mibs и -m ALL добавить любой MIBs в C:/usr/share/snmp/mibs.

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. 
+0

net-snm-config не входит в этот пакет из Net-SNMP – user1652528

+0

ОК, это жаль; но все же стоит попробовать -M обеспечить среду MIBDIRS в порядке. – k1eran

+1

Что касается особенностей Windows, я вижу в https://kb.juniper.net/InfoCenter/index?page=content&id=KB25949 инструкции по настройке среды MIBDIRS – k1eran

Смежные вопросы