cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar









Etc


Reference














.

os:linux:command:snmpget.html



snmpget - How to use snmpget command in Linux

nsmpget Options

snmpget -h

USAGE: snmpget [OPTIONS] AGENT OID [OID]...

OPTIONS:
  -h, --help            display this help message
  -H                    display configuration file directives understood
  -v 1|2c|3             specifies SNMP version to use
  -V, --version         display package version number
SNMP Version 1 or 2c specific
  -c COMMUNITY          set the community string


RFC1213 MIB-II (1.3.6.1.2.1)
NET-SNMP MIB(1.3.6.1.4.1.2021)


System Information

hostname (sysname=OID .1.3.6.1.2.1.1.5)

$ snmpget -v 2c 127.0.0.1 -c public .1.3.6.1.2.1.1.5.0
SNMPv2-MIB::sysName.0 = STRING: centos7

$ snmpget -v 2c 127.0.0.1 -c public sysName.0
SNMPv2-MIB::sysName.0 = STRING: centos7

uname -a (sysDescr = OID .1.3.6.1.2.1.1.1)

# snmpget -v 2c 127.0.0.1 -c public .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux centos7 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64

# snmpget -v 2c 127.0.0.1 -c public sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux centos7 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64



os/linux/command/snmpget.html.txt · Last modified: 2021/03/12 by admin

Page Tools