linux oid 进程数,snmp抓取linux机器OID一览 抓取squidOID

CPU Statistics

Load    ##  机器负载

1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1

5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2

15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

CPU

percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0

raw user cpu time: .1.3.6.1.4.1.2021.11.50.0

percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0

raw system cpu time: .1.3.6.1.4.1.2021.11.52.0

percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0

raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0

raw nice cpu time: .1.3.6.1.4.1.2021.11.51.0

Memory Statistics

Total Swap Size    snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.3.0

UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 489940 kB

Available Swap Space   snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.4.0

UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 284752 kB

Total RAM in machine    snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.5.0

UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 255672 kB

The available real memory    snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.6.0

UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 14456 kB

the Total free memory in the machine (free Swap memory + free RAM memory)

snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.11.0

UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 298804 kB

Total RAM Shared     snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.13.0

UCD-SNMP-MIB::memShared.0 = INTEGER: 0 kB

Total RAM Buffered      snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.14.0

UCD-SNMP-MIB::memBuffer.0 = INTEGER: 2888 kB

Total Cached Memory   snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.15.0

UCD-SNMP-MIB::memCached.0 = INTEGER: 47816 kB

Disk Statistics

The snmpd.conf needs to be edited. Add the following (assuming a machine with a single ‘/’ partition):

disk / 100000 (or)

includeAllDisks 10% for all partitions and disks

The OIDs are as follows

Path where the disk is mounted: .1.3.6.1.4.1.2021.9.1.2.1

Path of the device for the partition: .1.3.6.1.4.1.2021.9.1.3.1

Total size of the disk/partion (kBytes): .1.3.6.1.4.1.2021.9.1.6.1

Available space on the disk: .1.3.6.1.4.1.2021.9.1.7.1

Used space on the disk: .1.3.6.1.4.1.2021.9.1.8.1

Percentage of space used on disk: .1.3.6.1.4.1.2021.9.1.9.1

Percentage of inodes used on disk: .1.3.6.1.4.1.2021.9.1.10.1

System Uptime: .1.3.6.1.2.1.1.3.0

Examples

These Commands you need to run on the SNMP server

Get available disk space for / on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.9.1.7.1

this will return available disk space for the first entry in the ‘disk’ section of snmpd.conf; replace 1 with n for the nth entry

Get the 1-minute system load on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.1

Get the 5-minute system load on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.2

Get the 15-minute system load on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.3

Get amount of available swap space on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.4.4.0

#############################

57fa9a86fc0b76fd4d0e523696a106d5.png nlanr

1.3.6.1.4.1.3495

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png squid

1.3.6.1.4.1.3495.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSystem

1.3.6.1.4.1.3495.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSysVMsize

1.3.6.1.4.1.3495.1.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSysStorage

1.3.6.1.4.1.3495.1.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheUptime

1.3.6.1.4.1.3495.1.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheConfig

1.3.6.1.4.1.3495.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheAdmin

1.3.6.1.4.1.3495.1.2.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSoftware

1.3.6.1.4.1.3495.1.2.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheVersionId

1.3.6.1.4.1.3495.1.2.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheLoggingFacility

1.3.6.1.4.1.3495.1.2.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheStorageConfig

1.3.6.1.4.1.3495.1.2.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMemMaxSize

1.3.6.1.4.1.3495.1.2.5.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMemHighWM

1.3.6.1.4.1.3495.1.2.5.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMemLowWM

1.3.6.1.4.1.3495.1.2.5.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSwapMaxSize

1.3.6.1.4.1.3495.1.2.5.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSwapHighWM

1.3.6.1.4.1.3495.1.2.5.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSwapLowWM

1.3.6.1.4.1.3495.1.2.5.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cachePerf

1.3.6.1.4.1.3495.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSysPerf

1.3.6.1.4.1.3495.1.3.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSysPageFaults

1.3.6.1.4.1.3495.1.3.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheCurrentUnusedFileDescrCount

1.3.6.1.4.1.3495.1.3.1.10

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheCurrentReservedFileDescrCount

1.3.6.1.4.1.3495.1.3.1.11

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSysNumReads

1.3.6.1.4.1.3495.1.3.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheSysDefReads

1.3.6.1.4.1.3495.1.3.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMemUsage

1.3.6.1.4.1.3495.1.3.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheCpuUsage

1.3.6.1.4.1.3495.1.3.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMaxResSize

1.3.6.1.4.1.3495.1.3.1.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheNumObjCount

1.3.6.1.4.1.3495.1.3.1.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheCurrentLRUExpiration

1.3.6.1.4.1.3495.1.3.1.8

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheCurrentUnlinkRequests

1.3.6.1.4.1.3495.1.3.1.9

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheProtoStats

1.3.6.1.4.1.3495.1.3.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheProtoAggregateStats

1.3.6.1.4.1.3495.1.3.2.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheClientProtoHttpRequests

1.3.6.1.4.1.3495.1.3.2.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheServerRequests

1.3.6.1.4.1.3495.1.3.2.1.10

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheServerErrors

1.3.6.1.4.1.3495.1.3.2.1.11

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheServerInKb

1.3.6.1.4.1.3495.1.3.2.1.12

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheServerOutKb

1.3.6.1.4.1.3495.1.3.2.1.13

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheCurrentSwapSize

1.3.6.1.4.1.3495.1.3.2.1.14

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheClients

1.3.6.1.4.1.3495.1.3.2.1.15

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheHttpHits

1.3.6.1.4.1.3495.1.3.2.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheHttpErrors

1.3.6.1.4.1.3495.1.3.2.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheHttpInKb

1.3.6.1.4.1.3495.1.3.2.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheHttpOutKb

1.3.6.1.4.1.3495.1.3.2.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheIcpPktsSent

1.3.6.1.4.1.3495.1.3.2.1.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheIcpPktsRecv

1.3.6.1.4.1.3495.1.3.2.1.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheIcpKbSent

1.3.6.1.4.1.3495.1.3.2.1.8

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheIcpKbRecv

1.3.6.1.4.1.3495.1.3.2.1.9

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

5dd1222fffb17578e762077c3fcb6038.png cacheMedianSvcTable

1.3.6.1.4.1.3495.1.3.2.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

8951eaeacb309013db6a4dee7cd9f7a4.png cacheMedianSvcEntry

1.3.6.1.4.1.3495.1.3.2.2.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheMedianTime

1.3.6.1.4.1.3495.1.3.2.2.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheRequestByteRatio

1.3.6.1.4.1.3495.1.3.2.2.1.10

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheHttpAllSvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheHttpMissSvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheHttpNmSvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheHttpHitSvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheIcpQuerySvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheIcpReplySvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheDnsSvcTime

1.3.6.1.4.1.3495.1.3.2.2.1.8

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheRequestHitRatio

1.3.6.1.4.1.3495.1.3.2.2.1.9

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheNetwork

1.3.6.1.4.1.3495.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheIpCache

1.3.6.1.4.1.3495.1.4.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheEntries

1.3.6.1.4.1.3495.1.4.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheRequests

1.3.6.1.4.1.3495.1.4.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheHits

1.3.6.1.4.1.3495.1.4.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cachePendingHits

1.3.6.1.4.1.3495.1.4.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheNegativeHits

1.3.6.1.4.1.3495.1.4.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMisses

1.3.6.1.4.1.3495.1.4.1.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheBlockingGetHostByName

1.3.6.1.4.1.3495.1.4.1.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheAttemptReleaseLockedEntries

1.3.6.1.4.1.3495.1.4.1.8

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnCache

1.3.6.1.4.1.3495.1.4.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnEntries

1.3.6.1.4.1.3495.1.4.2.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnRequests

1.3.6.1.4.1.3495.1.4.2.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnHits

1.3.6.1.4.1.3495.1.4.2.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnPendingHits

1.3.6.1.4.1.3495.1.4.2.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnNegativeHits

1.3.6.1.4.1.3495.1.4.2.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnMisses

1.3.6.1.4.1.3495.1.4.2.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheFqdnBlockingGetHostByAddr

1.3.6.1.4.1.3495.1.4.2.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheDns

1.3.6.1.4.1.3495.1.4.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheDnsRequests

1.3.6.1.4.1.3495.1.4.3.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheDnsReplies

1.3.6.1.4.1.3495.1.4.3.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheDnsNumberServers

1.3.6.1.4.1.3495.1.4.3.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

7c078e92f3f9a177b49490198e716916.png cacheMesh

1.3.6.1.4.1.3495.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

5dd1222fffb17578e762077c3fcb6038.png cachePeerTable

1.3.6.1.4.1.3495.1.5.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

8951eaeacb309013db6a4dee7cd9f7a4.png cachePeerEntry

1.3.6.1.4.1.3495.1.5.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerName

1.3.6.1.4.1.3495.1.5.1.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerRtt

1.3.6.1.4.1.3495.1.5.1.1.10

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerIgnored

1.3.6.1.4.1.3495.1.5.1.1.11

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerKeepAlSent

1.3.6.1.4.1.3495.1.5.1.1.12

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerKeepAlRecv

1.3.6.1.4.1.3495.1.5.1.1.13

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerAddr

1.3.6.1.4.1.3495.1.5.1.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerPortHttp

1.3.6.1.4.1.3495.1.5.1.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerPortIcp

1.3.6.1.4.1.3495.1.5.1.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerType

1.3.6.1.4.1.3495.1.5.1.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerState

1.3.6.1.4.1.3495.1.5.1.1.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerPingsSent

1.3.6.1.4.1.3495.1.5.1.1.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerPingsAcked

1.3.6.1.4.1.3495.1.5.1.1.8

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cachePeerFetches

1.3.6.1.4.1.3495.1.5.1.1.9

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

5dd1222fffb17578e762077c3fcb6038.png cacheClientTable

1.3.6.1.4.1.3495.1.5.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

8951eaeacb309013db6a4dee7cd9f7a4.png cacheClientEntry

1.3.6.1.4.1.3495.1.5.2.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientAddr

1.3.6.1.4.1.3495.1.5.2.1.1

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientHttpRequests

1.3.6.1.4.1.3495.1.5.2.1.2

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientHttpKb

1.3.6.1.4.1.3495.1.5.2.1.3

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientHttpHits

1.3.6.1.4.1.3495.1.5.2.1.4

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientHTTPHitKb

1.3.6.1.4.1.3495.1.5.2.1.5

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientIcpRequests

1.3.6.1.4.1.3495.1.5.2.1.6

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientIcpKb

1.3.6.1.4.1.3495.1.5.2.1.7

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientIcpHits

1.3.6.1.4.1.3495.1.5.2.1.8

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

ca29a1172d13ae8665d5a4bf739e856a.png

933a758d1571270966567bc5c80c0848.png cacheClientIcpHitKb

1.3.6.1.4.1.3495.1.5.2.1.9

配置详解:

1)配置snmp,编辑/etc/snmp/snmpd.conf

1.1)首选是定义一个共同体名(community),这里是public,及可以访问这个public的用户名(sec name),这里是notConfigUser。Public相当于用户notConfigUser的密码

1.2)定义一个组名(groupName)这里是notConfigGroup,及组的安全级别,把notConfigUser这个用户加到这个组中。

1.3)定义一个可操作的范围(view)名, 这里是all,范围是 .1

1.4)定义notConfigUser这个组在all这个view范围内可做的操作,这时定义了notConfigUser组的成员可对.1这个范围做只读操作。

1.5)重启snmpd服务

1.6)列出snmpd开放端口

vi /etc/snmp/snmpd.conf

#       sec.name source          community

com2sec notConfigUser default      linuxtone

#            groupName      securityModel securityName

group   notConfigGroup   v1           notConfigUser

group   notConfigGroup   v2c           notConfigUser

#       name           incl/excl     subtree         mask(optional)

view all             included     .1

#       group          context sec.model sec.level prefix read   write notif

access notConfigGroup ""      any       noauth    exact all none none

复制代码

保存退出

service snmpd restart

netstat -anp|grep snmp

复制代码

2.1)查看阅读mib-2所管理的信息类别的MIB文件

参考答案:

more /usr/share/snmp/mibs/RFC1213-MIB.txt

复制代码

3)用snmpbulkwalk命令连接snmp服务器(127.0.0.1),获取snmp服务器的mib-2各种资讯

3.1)snmpbulkwalk用于通过SNMPv2 的SNMP GET BULK请求命令与其它网络实体通信,只能用于snmpv2,速度快于snmpwalk

3.2)指定共同体为public,协议为snmp2c

3.3)获取mib-2的system的数据,即.1.3.6.1.2.1.1(iso->identified organization->dod->internet->mgmt2->mib-2->system)

3.4)获取mib-2的interface的数据,即.1.3.6.1.2.1.2(iso->identified organization->dod->internet->mgmt2->mib-2->interface)

3.5)获取mib-2的address translation的数据,即.1.3.6.1.2.1.3(iso->identified organization->dod->internet->mgmt2->mib-2->address translation)

3.6)获取mib-2库的ip的数据,即.1.3.6.1.2.1.4(iso->identified organization->dod->internet->mgmt2->mib-2->ip)

3.7)获取mib-2库的icmp的数据,即.1.3.6.1.2.1.5(iso->identified organization->dod->internet->mgmt2->mib-2->icmp)

3.8)获取mib-2库的tcp的数据,即.1.3.6.1.2.1.6(iso->identified organization->dod->internet->mgmt2->mib-2->tcp)

3.9)获取mib-2库的udp的数据,即.1.3.6.1.2.1.7(iso->identified organization->dod->internet->mgmt2->mib-2->udp)

3.10)获取mib-2库的snmp的数据,即.1.3.6.1.2.1.11(iso->identified organization->dod->internet->mgmt2->mib-2->snmp)

参考答案:

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.1

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.2

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.3

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.4

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.5

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.6

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.7

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.11

snmpbulkwalk -v 2c 127.0.0.1 -c linuxtone .1.3.6.1.2.1.6

复制代码

4)查看阅读HOST-RESOURCES的MIB文件

参考答案:

more /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt

复制代码

5)查用snmpwalk命令连接snmp服务器(127.0.0.1),获取snmp服务器的HOST-RESOURCES的各种资讯

5.1)指定共同体为public,协议为snmpv1

5.2)获取HOST-RESOURCES的host(所有资源)

5.3)获取HOST-RESOURCES的hrSystem(系统日期/时间,初始化设备,内核引导参数,系统当前的登录用户数,当前的进程数,支持的最大进程数)

5.4)获取HOST-RESOURCES的hrStorage(内存大小,磁盘大小,使用情况等)

5.5)获取HOST-RESOURCES的hrDevice(设备ID,设备类型,对设备的描述,引导盘,挂载分区等)

5.6)获取HOST-RESOURCES的hrSWRun(线上系统的进程ID,进程名,涉及的参数,运行状态等)

5.7)获取HOST-RESOURCES的hrSWRunPerf(线上系统进程占用CPU的时间,占用内存的大小)

5.8)获取HOST-RESOURCES的hrSWInstalledName(已安装的软件包名)和hrSWInstalledDate(已安装的软件包时间)

参考答案:

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::host

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrSystem

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrStorage

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrDevice

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrSWRun

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrSWRunPerf

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrSWInstalledName

snmpwalk -v 1 127.0.0.1 -c linuxtone HOST-RESOURCES-MIB::hrSWInstalledDate

复制代码

6)查看阅读IF-MIB的MIB文件

参考答案:

more /usr/share/snmp/mibs/IF-MIB.txt

复制代码

7)用snmpdelta命令连接snmp服务器(127.0.0.1),监控网卡流量等信息

7.1)指定共同体为public,协议为snmpv1,以表格的方式输出结果,显示时间戳

7.2)监控IF-MIB::ifInUcastPkts(输入流量),IF-MIB::ifOutUcastPkts(输出流量),,如监控本地的第二块网卡instance为2

7.3)监控ifInDiscards(已经丢弃的收到的数据包的总数),格式同上

参考答案:

snmpdelta -c public -v 1 -Cs -CT 127.0.0.1 IF-MIB::ifInUcastPkts.2 IF-MIB::ifOutUcastPkts.2

snmpdelta -c public -v 1 -Cs -CT 127.0.0.1 ifInDiscards.2

复制代码

8)用snmpnetstat命令连接snmp服务器(127.0.0.1),查看snmp服务器的端口连接信息

8.1)指定共同体为public,协议为snmp2c

8.2)获取127.0.0.1的所有开放端口状态

8.3)获取127.0.0.1的网络接口状态

8.4)获取127.0.0.1的TCP协议的开放端口状态

参考答案:

snmpnetstat -v 2c -c linuxtone -a 127.0.0.1

snmpnetstat -v 2c -c linuxtone -i 127.0.0.1

snmpnetstat -v 2c -c linuxtone -P tcp 127.0.0.1

复制代码

9)用snmptranslate 命令在 MIB OID 在数字和文字名称之间进行转换

9.1)用snmptranslate把symbol 格式的HOST-RESOURCES-MIB::hrSystem 转换为 numberic 格式的oid,用-On(输出数字格式的oid),使用 -IR(允许“随机”访问 MIB)

9.2)用snmptranslate把symbol 格式的HOST-RESOURCES-MIB::hrSystem 转换为symbol 格式的 oid,用-Onf(输出符号格式的oid)

9.3)用snmptranslate输出该对象(iso.org.dod.internet.mgmt.mib-2)的详细定义,用-Td(包括文字名称、所属 MIB、类型、状态、读写权限、描述信息,数字格式的 OID)

9.4)用snmptranslate打印从指定OID(.1.3.6.1.2.1)开始一直到该OID(.1.3.6.1.2.1)所属的 MIB 子树末端的树型结构信息

9.5)用snmptranslate导出所有已经加载的 MIB 的数据,每个对象一行

9.6)用snmptranslate导出所有已经加载的 MIB 的对象,并且输出完整的 oid 路径

9.7)用snmptranslate导出已经加载的所有 MIB 的数字格式的 oid ,不含值和类型,仅仅有 oid 而已

9.8)用snmptranslate只输出文字格式的 OID 名称而已

参考答案:

snmptranslate -On -IR HOST-RESOURCES-MIB::hrSystem

snmptranslate -Onf -IR HOST-RESOURCES-MIB::hrSystem

snmptranslate -Td iso.org.dod.internet.mgmt.mib-2

snmptranslate -Tp iso.org.dod.internet.mgmt.mib-2

snmptranslate -Ta

snmptranslate -Tl

snmptranslate -To

snmptranslate -Ts

复制代码

10.1)用snmptranslate查询MID OID的数字为1.3.6.1.4.1.2021的详细信息

10.2)用snmptranslate列出1.3.6.1.4.1.2021树型结构

10.3)用snmpwalk连接127.0.0.1的snmp,通过UCD-SNMP-MIB列出proc的信息

10.4)用ps -e找过三个进程,写入到/etc/snmp/snmpd.conf配置文件中,如:keventd,nfsd,bdflush

10.5)重启snmpd服务

10.6)再用snmpwalk连接127.0.0.1的snmp,列出proc的信息

参考答案:

snmptranslate -Td 1.3.6.1.4.1.2021

snmptranslate -Tp 1.3.6.1.4.1.2021

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.2

复制代码

打开snmpd.conf文件

vi /etc/snmp/snmpd.conf

复制代码

找到# Process checks

加入:

proc keventd

proc nfsd

proc bdflush

复制代码

service snmpd restart

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.2

11.1)用snmpwalk连接127.0.0.1的snmp,通过UCD-SNMP-MIB列出shell脚本的输出信息

11.2)编辑/etc/snmp/snmpd.conf文件,加入:exec echotest /bin/echo hello world和exec shelltest /bin/sh /tmp/shtest

11.3)编写脚本shtest,输出hello world

11.4)重启服务

11.5)用snmpwalk连接127.0.0.1的snmp,列出shell脚本的输出信息

参考答案:

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.8

复制代码

编辑/etc/snmp/snmpd.conf文件vi /etc/snmp/snmpd.conf

找到:# Executables/scrīpts

在后面加入:

exec echotest /bin/echo

hello world

exec shelltest /bin/sh /tmp/shtest

复制代码

保存退出cd /tmp/

cat > shtest

#!/bin/sh

echo hello world

echo hi there

exit 35

复制代码

service snmpd restart

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.8

12.1)用snmpwalk连接127.0.0.1的snmp,通过UCD-SNMP-MIB列出磁盘信息

12.2)编辑/etc/snmp/snmpd.conf文件,加入根分区和/boot分区

12.3)用kill的方式重新读取配置

12.4)用snmpwalk连接127.0.0.1的snmp,列出磁盘信息

参考答案:

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.9

复制代码

编辑/etc/snmp/snmpd.conf文件vi /etc/snmp/snmpd.conf

找到:disk checks

加入:

disk / 10000

disk /boot

10000

保存退出kill -HUP `ps -e|grep snmpd|awk '{print $1}'`

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.9

13.1)用snmpwalk连接127.0.0.1的snmp,通过UCD-SNMP-MIB列出所有的系统进程

13.2)编辑/etc/snmp/snmpd.conf文件,加入:exec .1.3.6.1.4.1.2021.51 ps /bin/ps

13.3)用kill的方式重新读取配置

13.4)用snmpwalk连接127.0.0.1的snmp,列出系统信息

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.50

编辑/etc/snmp/snmpd.conf文件vi /etc/snmp/snmpd.conf

加入:

exec .1.3.6.1.4.1.2021.51

ps /bin/ps

保存退出kill -HUP `ps -e|grep snmpd|awk '{print $1}'`

snmpwalk -v 1 127.0.0.1 -c linuxtone .1.3.6.1.4.1.2021.50

作者:

auqfpe

时间:

2010-7-10 16:10

还不错,学习了,如果讲讲snmpv3的配置,就更好了。

作者:

flycn1985

时间:

2010-7-14 15:15

不错啊

收着

作者:

守住每一天

时间:

2010-7-15 00:28

今天被顶出来了。好贴 子哈。

作者:

广州蚊子

时间:

2010-7-19 21:42

关于MIB码可以到这里查询

一般用到的

你可能感兴趣的:(linux,oid,进程数)