[root@localhost lucc]#
snmptranslate -h
USAGE:
snmptranslate [OPTIONS]
OID [OID]...
Version: 5.7.3
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
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 DESCRIPTIONs 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 OID = 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'
Example
[root@localhost lucc]# snmptranslate -Tp -OS 1.3.6.1.4.1.8072.9999.9999.1+--bookAppMib(1) +--realTimeData(1) | | | +--realTimeDataTable(1) | | | | | +--realTimeDataEntry(1) | | | Index: realTimeDataIndex | | | | | +-- ---- Integer32 realTimeDataIndex(1) | | | Range: 1..65536 | | +-- -R-- Integer32 realTimeDataX1(2) | | | Range: 1..65536 | | +-- -R-- Integer32 realTimeDataY2(3) | | Range: 1..65536 | | | +-- -R-- Integer32 realTimeDataZ(2) | | Textual Convention: Float1TypeTC | | | +--portSetTable(3) | | | | | +--portSetEntry(1) | | | Index: entPhysicalIndex | | | | | +-- ---- Integer32 entPhysicalIndex(1) | | +-- -RW- String connectElecID(2) | | +-- -RW- Integer32 lightIndicator(3) | | | +--updateTable(4) | | | +--updateEntry(1) | | Index: entPhysicalIndex | | | +-- ---- Integer32 entPhysicalIndex(1) | +-- -RW- Integer32 loadRequestID(2) | | Range: 1..255 | +-- -RW- EnumVal loadIPType(3) | | Values: unknown(0), ipv4(1), ipv6(2) | +-- -RW- String loadServerIPAddress(4) | | Size: 0..16 | +-- -RW- INTEGER loadServerPort(5) | | Range: 1..65535 | +-- -RW- String loadFileName(6) | | Size: 0..255 | +-- -RW- EnumVal loadStatus(7) | | Values: initial(1), standby(2), transfering(3), readyToUpdate(4), updating(5), success(6), fail(7), requestUpdate(8) | +-- -R-- Integer32 loadProcess(8) | | Range: 0..100 | +-- -RW- EnumVal loadOperation(9) | | Values: nooperation(0), loadfile(1), updateDevice(2) | +-- -R-- String loadFailedDevice(10) | +--parameter(2) | +-- -RW- Integer32 parameterA(1) | +-- -RW- String parameterB(2) | | Textual Convention: DisplayString | | Size: 0..255 | | | +--parameterTable(3) | | | +--parameterEntry(1) | | Index: parameterIndex | | | +-- ---- Integer32 parameterIndex(1) | | Range: 1..65536 | +-- -RW- Integer32 parameterC1(2) | Range: 1..65536 | +--notificationGroup(3) | +--sysAlarms(0) | +--sysAlarmNotify(1) | +--notificationObjs(11) | +-- ---N Integer32 alarm1(1) +-- ---N String alarm2(2) | Textual Convention: DisplayString | Size: 0..255
+-- -RW- Integer32 alarmCounter(3)
[root@localhost mibs]# snmptranslate -Tp -IR ENTITY-MIB::entPhysicalIndex+-- ---- Integer32 entPhysicalIndex(1) Textual Convention: PhysicalIndex Range: 1..2147483647[root@localhost mibs]# snmptranslate -Tp -IR ENTITY-MIB::entPhysicalDescr+-- -R-- String entPhysicalDescr(2) Textual Convention: SnmpAdminString Size: 0..255