记一次snmp远程连接失败的记录
生活随笔
收集整理的這篇文章主要介紹了
记一次snmp远程连接失败的记录
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
記一次snmp遠程連接失敗的記錄
本次檢測server端采用的是v2c(有v1、v2c、v3三個版本)
- 現象:本地檢測(自測)正常,遠程服務器檢測timeout,no response。。。
-v:–version版本
-c:–community共同體
.1.3.6.1.2.1.1:指的是系統參數
snmpwalk -v 2c -c public localhost .1.3.6.1.2.1.1 #pass snmpwalk -v 2c -c public 10.1.13.132 .1.3.6.1.2.1.1 #failed后來反復的檢查配置文件,后來發現是被防火墻攔截了。。。
如果沒有被攔截的話,可以關注配置文件中AgentAddress、端口IP等是否正確,是否允許或禁止了哪些網段等。
擴展:
snmpd -v:查看net-snmp版本
community:共同體名,也叫團體字
groupname:組名,常見的notConfigGroup
view:定義可以查看哪些節點下的信息,例如:view all included .1 #表示可以查看1節點下所有的設備信息
snmp里面oid對應的信息MIB
系統參數(1.3.6.1.2.1.1)
- .1.3.6.1.2.1.1.1.0 獲取系統基本信息 SysDesc GET
- .1.3.6.1.2.1.1.3.0 監控時間 sysUptime GET
- .1.3.6.1.2.1.1.4.0 系統聯系人 sysContact GET
- .1.3.6.1.2.1.1.5.0 獲取機器名 SysName GET
- .1.3.6.1.2.1.1.6.0 機器坐在位置 SysLocation GET
- .1.3.6.1.2.1.1.7.0 機器提供的服務 SysService GET
- .1.3.6.1.2.1.25.4.2.1.2 系統運行的進程列表 hrSWRunName WALK
- .1.3.6.1.2.1.25.6.3.1.2 系統安裝的軟件列表 hrSWInstalledName WALK
網絡接口(1.3.6.1.2.1.2)
- .1.3.6.1.2.1.2.1.0 網絡接口的數目 IfNumber GET
- .1.3.6.1.2.1.2.2.1.2 網絡接口信息描述 IfDescr WALK
- .1.3.6.1.2.1.2.2.1.3 網絡接口類型 IfType WALK
- .1.3.6.1.2.1.2.2.1.4 接口發送和接收的最大IP數據報[BYTE] IfMTU WALK
- .1.3.6.1.2.1.2.2.1.5 接口當前帶寬[bps] IfSpeed WALK
- .1.3.6.1.2.1.2.2.1.6 接口的物理地址 IfPhysAddress WALK
- .1.3.6.1.2.1.2.2.1.8 接口當前操作狀態[up|down] IfOperStatus WALK
- .1.3.6.1.2.1.2.2.1.10 接口收到的字節數 IfInOctet WALK
- .1.3.6.1.2.1.2.2.1.16 接口發送的字節數 IfOutOctet WALK
- .1.3.6.1.2.1.2.2.1.11 接口收到的數據包個數 IfInUcastPkts WALK
- .1.3.6.1.2.1.2.2.1.17 接口發送的數據包個數 IfOutUcastPkts WALK
CPU及負載
- . 1.3.6.1.4.1.2021.11.9.0 用戶CPU百分比 ssCpuUser GET
- . 1.3.6.1.4.1.2021.11.10.0 系統CPU百分比 ssCpuSystem GET
- . 1.3.6.1.4.1.2021.11.11.0 空閑CPU百分比 ssCpuIdle GET
- . 1.3.6.1.4.1.2021.11.50.0 原始用戶CPU使用時間 ssCpuRawUser GET
- .1.3.6.1.4.1.2021.11.51.0 原始nice占用時間 ssCpuRawNice GET
- . 1.3.6.1.4.1.2021.11.52.0 原始系統CPU使用時間 ssCpuRawSystem GET
- . 1.3.6.1.4.1.2021.11.53.0 原始CPU空閑時間 ssCpuRawIdle GET
- . 1.3.6.1.2.1.25.3.3.1.2 CPU的當前負載,N個核就有N個負載 hrProcessorLoad WALK
- . 1.3.6.1.4.1.2021.11.3.0 ssSwapIn GET
- . 1.3.6.1.4.1.2021.11.4.0 SsSwapOut GET
- . 1.3.6.1.4.1.2021.11.5.0 ssIOSent GET
- . 1.3.6.1.4.1.2021.11.6.0 ssIOReceive GET
- . 1.3.6.1.4.1.2021.11.7.0 ssSysInterrupts GET
- . 1.3.6.1.4.1.2021.11.8.0 ssSysContext GET
- . 1.3.6.1.4.1.2021.11.54.0 ssCpuRawWait GET
- . 1.3.6.1.4.1.2021.11.56.0 ssCpuRawInterrupt GET
- . 1.3.6.1.4.1.2021.11.57.0 ssIORawSent GET
- . 1.3.6.1.4.1.2021.11.58.0 ssIORawReceived GET
- . 1.3.6.1.4.1.2021.11.59.0 ssRawInterrupts GET
- . 1.3.6.1.4.1.2021.11.60.0 ssRawContexts GET
- . 1.3.6.1.4.1.2021.11.61.0 ssCpuRawSoftIRQ GET
- . 1.3.6.1.4.1.2021.11.62.0 ssRawSwapIn. GET
- . 1.3.6.1.4.1.2021.11.63.0 ssRawSwapOut GET
- . 1.3.6.1.4.1.2021.10.1.3.1 Load5 GET
- . 1.3.6.1.4.1.2021.10.1.3.2 Load10 GET
- . 1.3.6.1.4.1.2021.10.1.3.3 Load15 GET
內存及磁盤(1.3.6.1.2.1.25)
- .1.3.6.1.2.1.25.2.2.0 獲取內存大小 hrMemorySize GET
- .1.3.6.1.2.1.25.2.3.1.1 存儲設備編號 hrStorageIndex WALK
- .1.3.6.1.2.1.25.2.3.1.2 存儲設備類型 hrStorageType[OID] WALK
- .1.3.6.1.2.1.25.2.3.1.3 存儲設備描述 hrStorageDescr WALK
- .1.3.6.1.2.1.25.2.3.1.4 簇的大小 hrStorageAllocationUnits WALK
- .1.3.6.1.2.1.25.2.3.1.5 簇的的數目 hrStorageSize WALK
- .1.3.6.1.2.1.25.2.3.1.6 使用多少,跟總容量相除就是占用率 hrStorageUsed WALK
- .1.3.6.1.4.1.2021.4.3.0 Total Swap Size(虛擬內存) memTotalSwap GET
- .1.3.6.1.4.1.2021.4.4.0 Available Swap Space memAvailSwap GET
- .1.3.6.1.4.1.2021.4.5.0 Total RAM in machine memTotalReal GET
- .1.3.6.1.4.1.2021.4.6.0 Total RAM used memAvailReal GET
- .1.3.6.1.4.1.2021.4.11.0 Total RAM Free memTotalFree GET
- .1.3.6.1.4.1.2021.4.13.0 Total RAM Shared memShared GET
- .1.3.6.1.4.1.2021.4.14.0 Total RAM Buffered memBuffer GET
- .1.3.6.1.4.1.2021.4.15.0 Total Cached Memory memCached GET
- .1.3.6.1.4.1.2021.9.1.2 Path where the disk is mounted dskPath WALK
- .1.3.6.1.4.1.2021.9.1.3 Path of the device for the partition dskDevice WALK
- .1.3.6.1.4.1.2021.9.1.6 Total size of the disk/partion (kBytes) dskTotal WALK
- .1.3.6.1.4.1.2021.9.1.7 Available space on the disk dskAvail WALK
- .1.3.6.1.4.1.2021.9.1.8 Used space on the disk dskUsed WALK
- .1.3.6.1.4.1.2021.9.1.9 Percentage of space used on disk dskPercent WALK
- .1.3.6.1.4.1.2021.9.1.10 Percentage of inodes used on disk dskPercentNode WALK
總結
以上是生活随笔為你收集整理的记一次snmp远程连接失败的记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: matlab液位控制系统设计,基于MAT
- 下一篇: 自制AutoCAD实用工具