全部博文(167)
分类: 系统运维
2010-06-04 19:12:12
(二层端口)
# 端口列表
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.49 = STRING: "1.1"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.50 = STRING: "1.2"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.51 = STRING: "1.3"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.52 = STRING: "1.4"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.53 = STRING: "1.5"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.54 = STRING: "1.6"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.55 = STRING: "1.7"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.49.46.56 = STRING: "1.8"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.50.46.49 = STRING: "2.1"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.3.50.46.50 = STRING: "2.2"
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.1.4.109.103.109.116 = STRING: "mgmt"
# 端口MAC地址
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.49 = Hex-STRING: 00 01 D7 48 7F 82
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.50 = Hex-STRING: 00 01 D7 48 7F 83
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.51 = Hex-STRING: 00 01 D7 48 7F 84
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.52 = Hex-STRING: 00 01 D7 48 7F 85
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.53 = Hex-STRING: 00 01 D7 48 7F 86
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.54 = Hex-STRING: 00 01 D7 48 7F 87
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.55 = Hex-STRING: 00 01 D7 48 7F 88
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.49.46.56 = Hex-STRING: 00 01 D7 48 7F 89
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.50.46.49 = Hex-STRING: 00 01 D7 48 7F 8A
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.3.50.46.50 = Hex-STRING: 00 01 D7 48 7F 8B
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.6.4.109.103.109.116 = Hex-STRING: 00 01 D7 48 7F 8D
# 端口updown情况(0为up,1为down)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 .1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.49 = INTEGER: 1
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.50 = INTEGER: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.51 = INTEGER: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.52 = INTEGER: 1
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.53 = INTEGER: 1
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.54 = INTEGER: 1
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.55 = INTEGER: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.49.46.56 = INTEGER: 1
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.50.46.49 = INTEGER: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.3.50.46.50 = INTEGER: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.1.2.1.17.4.109.103.109.116 = INTEGER: 0
# 端口入流量(Bytes)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.49 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.50 = Counter64: 260487820
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.51 = Counter64: 3641930327
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.52 = Counter64: 16782
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.53 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.54 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.55 = Counter64: 25794560114
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.49.46.56 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.50.46.49 = Counter64: 145752922374486
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.3.50.46.50 = Counter64: 145782412519093
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.3.4.109.103.109.116 = Counter64: 2147483647
# 端口出流量(Bytes)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.49 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.50 = Counter64: 5053013737507
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.51 = Counter64: 5049334918473
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.52 = Counter64: 4513507969
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.53 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.54 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.55 = Counter64: 25836670375
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.49.46.56 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.50.46.49 = Counter64: 146183336750621
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.3.50.46.50 = Counter64: 139425006953935
SNMPv2-SMI::enterprises.3375.2.1.2.4.4.3.1.5.4.109.103.109.116 = Counter64: 531655255
(三层端口)
# 端口描述
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.2.2.1.2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: sit0
IF-MIB::ifDescr.4 = STRING: tmm0
IF-MIB::ifDescr.5 = STRING: external
IF-MIB::ifDescr.6 = STRING: internal
IF-MIB::ifDescr.7 = STRING: ha_vlan
IF-MIB::ifDescr.8 = STRING: routing
IF-MIB::ifDescr.9 = STRING: v68
# 端口IP地址对应的Index
[root@affnet-cnc2300-63 ~]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.4.20.1.2
IP-MIB::ipAdEntIfIndex.1.1.1.1 = INTEGER: 7
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.127.1.1.1 = INTEGER: 4
IP-MIB::ipAdEntIfIndex.192.168.232.3 = INTEGER: 2
IP-MIB::ipAdEntIfIndex.192.168.238.254 = INTEGER: 6
IP-MIB::ipAdEntIfIndex.192.168.248.3 = INTEGER: 8
IP-MIB::ipAdEntIfIndex.219.136.244.248 = INTEGER: 5
IP-MIB::ipAdEntIfIndex.219.136.245.241 = INTEGER: 9
# 端口MAC地址
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.2.2.1.6
IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 0:e0:81:41:f4:6c
IF-MIB::ifPhysAddress.3 = STRING: 0:0:0:0:f4:6c
IF-MIB::ifPhysAddress.4 = STRING: 0:98:76:54:32:10
IF-MIB::ifPhysAddress.5 = STRING: 0:1:d7:48:7f:82
IF-MIB::ifPhysAddress.6 = STRING: 0:1:d7:48:7f:86
IF-MIB::ifPhysAddress.7 = STRING: 0:1:d7:48:7f:88
IF-MIB::ifPhysAddress.8 = STRING: 0:1:d7:48:7f:8a
IF-MIB::ifPhysAddress.9 = STRING: 0:ff:5a:55:99:8
# 端口updown情况
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.2.2.1.8
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifOperStatus.4 = INTEGER: up(1)
IF-MIB::ifOperStatus.5 = INTEGER: up(1)
IF-MIB::ifOperStatus.6 = INTEGER: up(1)
IF-MIB::ifOperStatus.7 = INTEGER: up(1)
IF-MIB::ifOperStatus.8 = INTEGER: up(1)
IF-MIB::ifOperStatus.9 = INTEGER: up(1)
# 网卡入流量(Bytes)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.2.2.1.10
IF-MIB::ifInOctets.1 = Counter32: 3432719012
IF-MIB::ifInOctets.2 = Counter32: 944324650
IF-MIB::ifInOctets.3 = Counter32: 0
IF-MIB::ifInOctets.4 = Counter32: 362079276
IF-MIB::ifInOctets.5 = Counter32: 979204181
IF-MIB::ifInOctets.6 = Counter32: 496425180
IF-MIB::ifInOctets.7 = Counter32: 2268583697
IF-MIB::ifInOctets.8 = Counter32: 469388542
IF-MIB::ifInOctets.9 = Counter32: 0
网卡出流量(Bytes)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.2.2.1.16
IF-MIB::ifOutOctets.1 = Counter32: 3432738750
IF-MIB::ifOutOctets.2 = Counter32: 611856715
IF-MIB::ifOutOctets.3 = Counter32: 0
IF-MIB::ifOutOctets.4 = Counter32: 629690104
IF-MIB::ifOutOctets.5 = Counter32: 171404578
IF-MIB::ifOutOctets.6 = Counter32: 1218063511
IF-MIB::ifOutOctets.7 = Counter32: 2307249059
IF-MIB::ifOutOctets.8 = Counter32: 10581878
IF-MIB::ifOutOctets.9 = Counter32: 378
(系统信息)
负载load
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.2021.10.1.2
UCD-SNMP-MIB::laNames.1 = STRING: Load-1
UCD-SNMP-MIB::laNames.2 = STRING: Load-5
UCD-SNMP-MIB::laNames.3 = STRING: Load-15
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.2021.10.1.3
UCD-SNMP-MIB::laLoad.1 = STRING: 1.93
UCD-SNMP-MIB::laLoad.2 = STRING: 1.94
UCD-SNMP-MIB::laLoad.3 = STRING: 1.92
Memory空闲(KByte)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 14504
Memory总量(KByte)
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.4.1.2021.4.5.0
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 220364
主机名
[root@affnet-cnc2300-63 net-snmp-5.2.1]# snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.3 1.3.6.1.2.1.1.5.0
SNMPv2-MIB::sysName.0 = STRING: ct-f5-1-s71-2f-i7-n337.pconline.com.cn