← 返回命令列表

Linux command

snmptranslate 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Translate a numeric OID

snmptranslate [.1.3.6.1.2.1.1.1.0]

Translate a textual OID

snmptranslate -On [sysDescr.0]

Show full OID details

snmptranslate -Td [sysDescr]

Display the MIB tree

snmptranslate -Tp [system]

Search for OIDs

snmptranslate -TB [pattern]

Show all OIDs

snmptranslate -Ta

Load additional MIB

snmptranslate -m [+MY-MIB] [OID]

说明

snmptranslate is a utility for translating between numeric and textual forms of SNMP Object Identifiers (OIDs). It uses MIB (Management Information Base) files to perform translations and can display detailed information about OIDs including their descriptions, syntax, and access permissions. The tool is useful for understanding MIB structure, exploring available OIDs, and converting between human-readable names and numeric dotted notation used in SNMP operations. It does not communicate with any SNMP agent; all translations are performed locally using loaded MIB files. MIBs define the structure and meaning of OIDs. Common MIBs like SNMPv2-MIB and IF-MIB are loaded by default, but vendor-specific MIBs may need to be explicitly loaded.

参数

-On
Print OID in numeric form only.
-Of
Print full OID path.
-OS
Print the last symbolic element of the OID.
-Td
Print detailed information including description, type, and access.
-Tp
Print a tree of subtree rooted at the OID.
-Ta
Print all OIDs in the loaded MIBs.
-TB _pattern_
Search for OIDs matching the regex pattern.
-m _MIBLIST_
Colon-separated list of MIB modules to load. Use +MIB to add to defaults.
-M _PATHLIST_
Colon-separated list of directories to search for MIBs.
-IR
Use random access lookup for better performance.
-h
Display help information.

FAQ

What is the snmptranslate command used for?

snmptranslate is a utility for translating between numeric and textual forms of SNMP Object Identifiers (OIDs). It uses MIB (Management Information Base) files to perform translations and can display detailed information about OIDs including their descriptions, syntax, and access permissions. The tool is useful for understanding MIB structure, exploring available OIDs, and converting between human-readable names and numeric dotted notation used in SNMP operations. It does not communicate with any SNMP agent; all translations are performed locally using loaded MIB files. MIBs define the structure and meaning of OIDs. Common MIBs like SNMPv2-MIB and IF-MIB are loaded by default, but vendor-specific MIBs may need to be explicitly loaded.

How do I run a basic snmptranslate example?

Run `snmptranslate [.1.3.6.1.2.1.1.1.0]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -On do in snmptranslate?

Print OID in numeric form only.