关注开源技术(黑龙江。哈尔滨) 倡导企业级开源应用,探索信息化方案标准; 集成开源众多新成果,消除开源方案忧与患; 力推低成本开源战车,笑纳八方来客叙开源; 普及开源知识助推力,喜迎开源企业展宏图;

snmptranslate

上一篇 / 下一篇  2008-06-09 21:30:12 / 个人分类:开源应用TOOLS

fuqiang@fuqiang-laptop:~$ snmptranslate
USAGE: snmptranslate [OPTIONS] OID [OID]...

 

OPTIONS:
  -h            display this help message
  -V            display package version number
  -m MIB[:...]        load given list of MIBs (ALL loads everything)
  -M DIR[:...]        look in given list of directories for MIBs
  -D TOKEN[,...]    turn on debugging output for the specified TOKENs
              (ALL gives extremely verbose debugging output)
  -w WIDTH        set width of tree and detail output
  -T TRANSOPTS        Set various options controlling report produced:
              B:  print all matching objects for a regex search
              d:  print full details of the given OID
              p:  print tree format symbol table
              a:  print ASCII format symbol table
              l:  enable labeled OID report
              o:  enable OID report
              s:  enable dotted symbolic report
              z:  enable MIB child OID report
              t:  enable alternate format symbolic suffix report
  -P MIBOPTS        Toggle various defaults controlling mib parsing:
              u:  allow the use of underlines in MIB symbols
              c:  disallow the use of "--" to terminate comments
              d:  save the DEscrīptIONs of the MIB objects
              e:  disable errors when MIB symbols conflict
              w:  enable warnings when MIB symbols conflict
              W:  enable detailed warnings when MIB symbols conflict
              R:  replace MIB symbols from latest module
  -O OUTOPTS        Toggle various defaults controlling output display:
              0:  print leading 0 for single-digit hex characters
              a:  print all strings in ascii format
              b:  do not break OID indexes down
              e:  print enums numerically
              E:  escape quotes in string indices
              f:  print full OIDs on output
              n:  print OIDs numerically
              q:  quick print for easier parsing
              Q:  quick print with equal-signs
              s:  print only last symbolic element of OID
              S:  print MIB module-id plus last element
              t:  print timeticks unparsed as numeric integers
              T:  print human-readable text along with hex strings
              u:  print OIDs using UCD-style prefix suppression
              U:  don't print units
              v:  print values only (not ōID = value)
              x:  print all strings in hex format
              X:  extended index format
  -I INOPTS        Toggle various defaults controlling input parsing:
              b:  do best/regex matching to find a MIB node
              h:  don't apply DISPLAY-HINTs
              r:  do not check values for range/type legality
              R:  do random access to OID labels
              u:  top-level OIDs must have '.' prefix (UCD-style)
              s SUFFIX:  Append all textual OIDs with SUFFIX before parsing
              S PREFIX:  Prepend all textual OIDs with PREFIX before parsing
  -L LOGOPTS        Toggle various defaults controlling logging:
              e:          log to standard error
              o:          log to standard output
              n:          don't log at all
              f file:      log to the specified file
              s facility:  log to syslog (via the specified facility)

              (variants)
              [EON] pri:  log to standard error, output or /dev/null for level 'pri' and above
              [EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
              [FS] pri token:    log to file/syslog for level 'pri' and above
              [FS] p1-p2 token:  log to file/syslog for levels 'p1' to 'p2'
fuqiang@fuqiang-laptop:~$ snmptranslate .1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance
fuqiang@fuqiang-laptop:~$ snmptranslate -On SNMPv2-MIB::sysUpTime.0
.1.3.6.1.2.1.1.3.0
fuqiang@fuqiang-laptop:~$ snmptranslate -Of SNMPv2-MIB::sysUpTime.0
.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.sysUpTimeInstance
fuqiang@fuqiang-laptop:~$ snmptranslate .iso.3.6.1.private.enterprises.2021.2.1.prNames.0
UCD-SNMP-MIB::prNames.0
fuqiang@fuqiang-laptop:~$ snmptranslate -On .iso.3.6.1.private.enterprises.2021.2.1.prNames.0
.1.3.6.1.4.1.2021.2.1.2.0
fuqiang@fuqiang-laptop:~$ snmptranslate -Of .iso.3.6.1.private.enterprises.2021.2.1.prNames.0
.iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prNames.0
fuqiang@fuqiang-laptop:~$ snmptranslate sysUpTime.0
No log handling enabled - turning on stderr logging
sysUpTime.0: Unknown Object Identifier (Sub-id not found: (top) -> sysUpTime)
fuqiang@fuqiang-laptop:~$ snmptranslate -IR sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance
fuqiang@fuqiang-laptop:~$ snmptranslate -Ib 'sys.*ime'
SNMPv2-MIB::sysORUpTime
fuqiang@fuqiang-laptop:~$ snmptranslate -TB 'sys.*ime'
SNMPv2-MIB::sysORUpTime
SNMPv2-MIB::sysUpTime
DISMAN-EVENT-MIB::sysUpTimeInstance
HOST-RESOURCES-MIB::hrSystemUptime
fuqiang@fuqiang-laptop:~$ snmptranslate -On -Td SNMPv2-MIB::sysUpTime
.1.3.6.1.2.1.1.3
sysUpTime OBJECT-TYPE
  -- FROM    SNMPv2-MIB, RFC1213-MIB
  SYNTAX    TimeTicks
  MAX-ACCESS    read-only
  STATUS    current
  DEscrīptION    "The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized."
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) system(1) 3 }
fuqiang@fuqiang-laptop:~$ snmptranslate -Tp -IR system
+--system(1)
  |
  +-- -R-- String    sysDescr(1)
  |        Textual Convention: DisplayString
  |        Size: 0..255
  +-- -R-- ObjID    sysObjectID(2)
  +-- -R-- TimeTicks sysUpTime(3)
  |  |
  |  +--sysUpTimeInstance(0)
  |
  +-- -RW- String    sysContact(4)
  |        Textual Convention: DisplayString
  |        Size: 0..255
  +-- -RW- String    sysName(5)
  |        Textual Convention: DisplayString
  |        Size: 0..255
  +-- -RW- String    sysLocation(6)
  |        Textual Convention: DisplayString
  |        Size: 0..255
  +-- -R-- INTEGER  sysServices(7)
  |        Range: 0..127
  +-- -R-- TimeTicks sysORLastChange(8)
  |        Textual Convention: TimeStamp
  |
  +--sysORTable(9)
      |
      +--sysOREntry(1)
        |  Index: sysORIndex
        |
        +-- ---- INTEGER  sysORIndex(1)
        |        Range: 1..2147483647
        +-- -R-- ObjID    sysORID(2)
        +-- -R-- String    sysORDescr(3)
        |        Textual Convention: DisplayString
        |        Size: 0..255
        +-- -R-- TimeTicks sysORUpTime(4)
                  Textual Convention: TimeStamp
fuqiang@fuqiang-laptop:~$

TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar