Comandos SNMP

Page last edited hace 2059 días 13 horas
De Solaris-ES
Saltar a: navegación, buscar
# /usr/sfw/bin/snmpwalk -Osun -c public -v 1 192.168.152.15.1.3.6.1.4.1.2021.11
  .1.3.6.1.4.1.2021.11.1.0 = INTEGER: 1
  .1.3.6.1.4.1.2021.11.2.0 = STRING: systemStats
  .1.3.6.1.4.1.2021.11.3.0 = INTEGER: 0
  .1.3.6.1.4.1.2021.11.4.0 = INTEGER: 0
  .1.3.6.1.4.1.2021.11.5.0 = INTEGER: 70
  .1.3.6.1.4.1.2021.11.6.0 = INTEGER: 3
  .1.3.6.1.4.1.2021.11.7.0 = INTEGER: 1640
  .1.3.6.1.4.1.2021.11.8.0 = INTEGER: 3521
  .1.3.6.1.4.1.2021.11.9.0 = INTEGER: 13
  .1.3.6.1.4.1.2021.11.10.0 = INTEGER: 35
  .1.3.6.1.4.1.2021.11.11.0 = INTEGER: 53
  .1.3.6.1.4.1.2021.11.50.0 = Counter32: 38656237
  .1.3.6.1.4.1.2021.11.52.0 = Counter32: 30902305
  .1.3.6.1.4.1.2021.11.53.0 = Counter32: 447670200
  .1.3.6.1.4.1.2021.11.54.0 = Counter32: 0
  .1.3.6.1.4.1.2021.11.55.0 = Counter32: 30902305
  .1.3.6.1.4.1.2021.11.57.0 = Counter32: 5276250
  .1.3.6.1.4.1.2021.11.58.0 = Counter32: 699890
  .1.3.6.1.4.1.2021.11.59.0 = Counter32: 699890
  .1.3.6.1.4.1.2021.11.60.0 = Counter32: 699890
# snmpwalk -Osu -c public -v 1 192.168.152.15.1.3.6.1.4.1.2021.11
  enterprises.ucdavis.systemStats.ssIndex.0 = INTEGER: 1
  enterprises.ucdavis.systemStats.ssErrorName.0 = STRING: systemStats
  enterprises.ucdavis.systemStats.ssSwapIn.0 = INTEGER: 0
  enterprises.ucdavis.systemStats.ssSwapOut.0 = INTEGER: 0
  enterprises.ucdavis.systemStats.ssIOSent.0 = INTEGER: 89
  enterprises.ucdavis.systemStats.ssIOReceive.0 = INTEGER: 3
  enterprises.ucdavis.systemStats.ssSysInterrupts.0 = INTEGER: 1850
  enterprises.ucdavis.systemStats.ssSysContext.0 = INTEGER: 4261
  enterprises.ucdavis.systemStats.ssCpuUser.0 = INTEGER: 15
  enterprises.ucdavis.systemStats.ssCpuSystem.0 = INTEGER: 43
  enterprises.ucdavis.systemStats.ssCpuIdle.0 = INTEGER: 43
  enterprises.ucdavis.systemStats.ssCpuRawUser.0 = Counter32: 38657810
  enterprises.ucdavis.systemStats.ssCpuRawSystem.0 = Counter32: 30906797
  enterprises.ucdavis.systemStats.ssCpuRawIdle.0 = Counter32: 447674119
  enterprises.ucdavis.systemStats.ssCpuRawWait.0 = Counter32: 0
  enterprises.ucdavis.systemStats.ssCpuRawKernel.0 = Counter32: 30906797
  enterprises.ucdavis.systemStats.ssIORawSent.0 = Counter32: 5285345
  enterprises.ucdavis.systemStats.ssIORawReceived.0 = Counter32: 700389
  enterprises.ucdavis.systemStats.ssRawInterrupts.0 = Counter32: 700389
  enterprises.ucdavis.systemStats.ssRawContexts.0 = Counter32: 700389
  • Valores Puntuales con snmpget
# /usr/sfw/bin/snmpget -Osu -c public -v 1
  192.168.152.15.1.3.6.1.4.1.2021.11.9.0
  enterprises.ucdavis.systemStats.ssCpuUser.0 = INTEGER: 14
# /usr/sfw/bin/snmpget -Osu -c public -v 1
  192.168.152.15.1.3.6.1.4.1.2021.11.10.0
  enterprises.ucdavis.systemStats.ssCpuSystem.0 = INTEGER: 44
# /usr/sfw/bin/snmpget -Osu -c public -v 1
  192.168.152.15.1.3.6.1.4.1.2021.11.11.0
  enterprises.ucdavis.systemStats.ssCpuIdle.0 = INTEGER: 46
  • Para arrancar el servicio de SNMP en Solaris 10
# svcadm enable sma
# svcs -a|egrep -i sma
  online         Oct_08   svc:/application/management/sma:default
  • Configuracion de SNMP
# cat /etc/snmp/conf/snmpd.conf
  • Modificar la community
 read-community  public
 #write-community private
  • Puert del SNMP en /etc/services
 snmpd           161/udp        snmp             # SMA snmp daemon