SNMP常用OID.docx

上传人:b****2 文档编号:1066049 上传时间:2023-04-30 格式:DOCX 页数:11 大小:19.38KB
下载 相关 举报
SNMP常用OID.docx_第1页
第1页 / 共11页
SNMP常用OID.docx_第2页
第2页 / 共11页
SNMP常用OID.docx_第3页
第3页 / 共11页
SNMP常用OID.docx_第4页
第4页 / 共11页
SNMP常用OID.docx_第5页
第5页 / 共11页
SNMP常用OID.docx_第6页
第6页 / 共11页
SNMP常用OID.docx_第7页
第7页 / 共11页
SNMP常用OID.docx_第8页
第8页 / 共11页
SNMP常用OID.docx_第9页
第9页 / 共11页
SNMP常用OID.docx_第10页
第10页 / 共11页
SNMP常用OID.docx_第11页
第11页 / 共11页
亲,该文档总共11页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

SNMP常用OID.docx

《SNMP常用OID.docx》由会员分享,可在线阅读,更多相关《SNMP常用OID.docx(11页珍藏版)》请在冰点文库上搜索。

SNMP常用OID.docx

SNMP常用OID

SNMP常用OID

LinuxSNMPOID’sforCPU,MemoryandDiskStatistics

SNMPstandsforSimpleNetworkManagementProtocolandconsistsofthreekeycomponents:

manageddevices,agents,andnetwork-managementsystems(NMSs).AmanageddeviceisanodethathasanSNMPagentandresidesonamanagednetwork.Thesedevicescanberoutersandaccessserver,switchesandbridges,hubs,computerhosts,orprinters.Anagentisasoftwaremoduleresidingwithinadevice.ThisagenttranslatesinformationintoacompatibleformatwithSNMP.AnNMSrunsmonitoringapplications.Theyprovidethebulkofprocessingandmemoryresourcesrequiredfornetworkmanagement.

SNMPMIBs,OIDsOverview

MIBstandsforManagementInformationBaseandisacollectionofinformationorganizedhierarchically.TheseareaccessedusingaprotocolsuchasSNMP.TherearetwotypesofMIBs:

scalarandtabular.ScalarobjectsdefineasingleobjectinstancewhereastabularobjectsdefinemultiplerelatedobjectinstancesgroupedinMIBtables.

MIBfilesforspecificdevicesorsystemscanbedownloadedfromhere

OIDsorObjectIdentifiersuniquelyidentifymangedobjectsinaMIBhierarchy.Thiscanbedepictedasatree,thelevelsofwhichareassignedbydifferentorganizations.ToplevelMIBobjectIDs(OIDs)belongtodifferentstandardorganizations.Vendorsdefineprivatebranchesincludingmanagedobjectsfortheirownproducts.

HereisasamplestructureofanOID

Iso

(1).org(3).dod(6).internet

(1).private(4).transition(868).products

(2).chassis(4).card

(1).slotCps

(2)-

.-cpsSlotSummary

(1).cpsModuleTable

(1).cpsModuleEntry

(1).cpsModuleModel(3).3562.3

MostofthepeoplemaybelookingforOID’sforLinuxOID’sforCPU,MemoryandDiskStatisticsforthisfirstyouneedtoinstallSNMPserverandclients.IfyouwanttoinstallSNMPserverandclientinstallationinlinux学习checkhere

CPUStatistics

Load

1minuteLoad:

.1.3.6.1.4.1.2021.10.1.3.1

5minuteLoad:

.1.3.6.1.4.1.2021.10.1.3.2

15minuteLoad:

.1.3.6.1.4.1.2021.10.1.3.3

CPU

percentageofuserCPUtime:

.1.3.6.1.4.1.2021.11.9.0

rawusercputime:

.1.3.6.1.4.1.2021.11.50.0

percentagesofsystemCPUtime:

.1.3.6.1.4.1.2021.11.10.0

rawsystemcputime:

.1.3.6.1.4.1.2021.11.52.0

percentagesofidleCPUtime:

.1.3.6.1.4.1.2021.11.11.0

rawidlecputime:

.1.3.6.1.4.1.2021.11.53.0

rawnicecputime:

.1.3.6.1.4.1.2021.11.51.0

MemoryStatistics

TotalSwapSize:

.1.3.6.1.4.1.2021.4.3.0

AvailableSwapSpace:

.1.3.6.1.4.1.2021.4.4.0

TotalRAMinmachine:

.1.3.6.1.4.1.2021.4.5.0

TotalRAMused:

.1.3.6.1.4.1.2021.4.6.0

TotalRAMFree:

.1.3.6.1.4.1.2021.4.11.0

TotalRAMShared:

.1.3.6.1.4.1.2021.4.13.0

TotalRAMBuffered:

.1.3.6.1.4.1.2021.4.14.0

TotalCachedMemory:

.1.3.6.1.4.1.2021.4.15.0

DiskStatistics

Thesnmpd.confneedstobeedited.Addthefollowing(assumingamachinewithasingle‘/’partition):

disk/100000(or)

includeAllDisks10%forallpartitionsanddisks

TheOIDsareasfollows

Pathwherethediskismounted:

.1.3.6.1.4.1.2021.9.1.2.1

Pathofthedeviceforthepartition:

.1.3.6.1.4.1.2021.9.1.3.1

Totalsizeofthedisk/partion(kBytes):

.1.3.6.1.4.1.2021.9.1.6.1

Availablespaceonthedisk:

.1.3.6.1.4.1.2021.9.1.7.1

Usedspaceonthedisk:

.1.3.6.1.4.1.2021.9.1.8.1

Percentageofspaceusedondisk:

.1.3.6.1.4.1.2021.9.1.9.1

Percentageofinodesusedondisk:

.1.3.6.1.4.1.2021.9.1.10.1

SystemUptime:

.1.3.6.1.2.1.1.3.0

Examples

TheseCommandsyouneedtorunontheSNMPserver

Getavailablediskspacefor/onthetargethost

#snmpget-v1-c“community”target_name_or_ip.1.3.6.1.4.1.2021.9.1.7.1

thiswillreturnavailablediskspaceforthefirstentryinthe‘disk’sectionofsnmpd.conf;replace1withnforthenthentry

Getthe1-minutesystemloadonthetargethost

#snmpget-v1-c“community”target_name_or_ip.1.3.6.1.4.1.2021.10.1.3.1

Getthe5-minutesystemloadonthetargethost

#snmpget-v1-c“community”target_name_or_ip.1.3.6.1.4.1.2021.10.1.3.2

Getthe15-minutesystemloadonthetargethost

#snmpget-v1-c“community”target_name_or_ip.1.3.6.1.4.1.2021.10.1.3.3

Getamountofavailableswapspaceonthetargethost

#snmpget-v1-c“community”target_name_or_ip.1.3.6.1.4.1.2021.4.4.0

VariableDescriptorObjectIdentifier

SystemGroup

sysDescr1.3.6.1.2.1.1.1

sysObjectID1.3.6.1.2.1.1.2

sysUpTime1.3.6.1.2.1.1.3

sysContact1.3.6.1.2.1.1.4

sysName1.3.6.1.2.1.1.5

sysLocation1.3.6.1.2.1.1.6

sysServices1.3.6.1.2.1.1.7

InterfacesGroup

ifNumber1.3.6.1.2.1.2.1

ifTable1.3.6.1.2.1.2.2

ifEntry1.3.6.1.2.1.2.2.1

ifIndex1.3.6.1.2.1.2.2.1.1

ifDescr1.3.6.1.2.1.2.2.1.2

ifType1.3.6.1.2.1.2.2.1.3

ifMtu1.3.6.1.2.1.2.2.1.4

ifSpeed1.3.6.1.2.1.2.2.1.5

ifPhysAddress1.3.6.1.2.1.2.2.1.6

ifAdminStatus1.3.6.1.2.1.2.2.1.7

ifOperStatus1.3.6.1.2.1.2.2.1.8

ifLastChange1.3.6.1.2.1.2.2.1.9

ifInOctets1.3.6.1.2.1.2.2.1.10

ifInUcastPkts1.3.6.1.2.1.2.2.1.11

ifInNUcastPkts1.3.6.1.2.1.2.2.1.12

ifInDiscards1.3.6.1.2.1.2.2.1.13

ifInErrors1.3.6.1.2.1.2.2.1.14

ifInUnknownProtos1.3.6.1.2.1.2.2.1.15

ifOutOctets1.3.6.1.2.1.2.2.1.16

ifOutUcastPkts1.3.6.1.2.1.2.2.1.17

ifOutNUcastPkts1.3.6.1.2.1.2.2.1.18

ifOutDiscards1.3.6.1.2.1.2.2.1.19

ifOutErrors1.3.6.1.2.1.2.2.1.20

ifOutQLen1.3.6.1.2.1.2.2.1.21

ifSpecific1.3.6.1.2.1.2.2.1.22

IPGroup

ipForwarding1.3.6.1.2.1.4.1

ipDefaultTTL1.3.6.1.2.1.4.2

ipInReceives1.3.6.1.2.1.4.3

ipInHdrErrors1.3.6.1.2.1.4.4

ipInAddrErrors1.3.6.1.2.1.4.5

ipForwDatagrams1.3.6.1.2.1.4.6

ipInUnknownProtos1.3.6.1.2.1.4.7

ipInDiscards1.3.6.1.2.1.4.8

ipInDelivers1.3.6.1.2.1.4.9

ipOutRequests1.3.6.1.2.1.4.10

ipOutDiscards1.3.6.1.2.1.4.11

ipOutNoRoutes1.3.6.1.2.1.4.12

ipReasmTimeout1.3.6.1.2.1.4.13

ipReasmReqds1.3.6.1.2.1.4.14

ipReasmOKs1.3.6.1.2.1.4.15

ipReasmFails1.3.6.1.2.1.4.16

ipFragsOKs1.3.6.1.2.1.4.17

ipFragsFails1.3.6.1.2.1.4.18

ipFragCreates1.3.6.1.2.1.4.19

ipAddrTable1.3.6.1.2.1.4.20

ipAddrEntry1.3.6.1.2.1.4.20.1

ipAdEntAddr1.3.6.1.2.1.4.20.1.1

ipAdEntIfIndex1.3.6.1.2.1.4.20.1.2

ipAdEntNetMask1.3.6.1.2.1.4.20.1.3

ipAdEntBcastAddr1.3.6.1.2.1.4.20.1.4

ipAdEntReasmMaxSize1.3.6.1.2.1.4.20.1.5

ICMPGroup

icmpInMsgs1.3.6.1.2.1.5.1

icmpInErrors1.3.6.1.2.1.5.2

icmpInDestUnreachs1.3.6.1.2.1.5.3

icmpInTimeExcds1.3.6.1.2.1.5.4

icmpInParmProbs1.3.6.1.2.1.5.5

icmpInSrcQuenchs1.3.6.1.2.1.5.6

icmpInRedirects1.3.6.1.2.1.5.7

icmpInEchos1.3.6.1.2.1.5.8

icmpInEchoReps1.3.6.1.2.1.5.9

icmpInTimestamps1.3.6.1.2.1.5.10

icmpInTimestampReps1.3.6.1.2.1.5.11

icmpInAddrMasks1.3.6.1.2.1.5.12

icmpInAddrMaskReps1.3.6.1.2.1.5.13

icmpOutMsgs1.3.6.1.2.1.5.14

icmpOutErrors1.3.6.1.2.1.5.15

icmpOutDestUnreachs1.3.6.1.2.1.5.16

icmpOutTimeExcds1.3.6.1.2.1.5.17

icmpOutParmProbs1.3.6.1.2.1.5.18

icmpOutSrcQuenchs1.3.6.1.2.1.5.19

icmpOutRedirects1.3.6.1.2.1.5.20

icmpOutEchos1.3.6.1.2.1.5.21

icmpOutEchoReps1.3.6.1.2.1.5.22

icmpOutTimestamps1.3.6.1.2.1.5.23

icmpOutTimestampReps1.3.6.1.2.1.5.24

icmpOutAddrMasks1.3.6.1.2.1.5.25

icmpOutAddrMaskReps1.3.6.1.2.1.5.26

TCPGroup

tcpRtoAlgorithm1.3.6.1.2.1.6.1

tcpRtoMin1.3.6.1.2.1.6.2

tcpRtoMax1.3.6.1.2.1.6.3

tcpMaxConn1.3.6.1.2.1.6.4

tcpActiveOpens1.3.6.1.2.1.6.5

tcpPassiveOpens1.3.6.1.2.1.6.6

tcpAttemptFails1.3.6.1.2.1.6.7

tcpEstabResets1.3.6.1.2.1.6.8

tcpCurrEstab1.3.6.1.2.1.6.9

tcpInSegs1.3.6.1.2.1.6.10

tcpOutSegs1.3.6.1.2.1.6.11

tcpRetransSegs1.3.6.1.2.1.6.12

tcpConnTable1.3.6.1.2.1.6.13

tcpConnEntry1.3.6.1.2.1.6.13.1

tcpConnState1.3.6.1.2.1.6.13.1.1

tcpConnLocalAddress1.3.6.1.2.1.6.13.1.2

tcpConnLocalPort1.3.6.1.2.1.6.13.1.3

tcpConnRemAddress1.3.6.1.2.1.6.13.1.4

tcpConnRemPort1.3.6.1.2.1.6.13.1.5

tcpInErrs1.3.6.1.2.1.6.14

tcpOutRsts1.3.6.1.2.1.6.15

UDPGroup

udpInDatagrams1.3.6.1.2.1.7.1

udpNoPorts1.3.6.1.2.1.7.2

udpInErrors1.3.6.1.2.1.7.3

udpOutDatagrams1.3.6.1.2.1.7.4

udpTable1.3.6.1.2.1.7.5

udpEntry1.3.6.1.2.1.7.5.1

udpLocalAddress1.3.6.1.2.1.7.5.1.1

udpLocalPort1.3.6.1.2.1.7.5.1.2

SNMPGroup

snmpInPkts1.3.6.1.2.1.11.1

snmpOutPkts1.3.6.1.2.1.11.2

snmpInBadVersions1.3.6.1.2.1.11.3

snmpInBadCommunityNames1.3.6.1.2.1.11.4

snmpInBadCommunityUses1.3.6.1.2.1.11.5

snmpInASNParseErrs1.3.6.1.2.1.11.6

NOTUSED1.3.6.1.2.1.11.7

snmpInTooBigs1.3.6.1.2.1.11.8

snmpInNoSuchNames1.3.6.1.2.1.11.9

snmpInBadValues1.3.6.1.2.1.11.10

snmpInReadOnlys1.3.6.1.2.1.11.11

snmpInGenErrs1.3.6.1.2.1.11.12

snmpInTotalReqVars1.3.6.1.2.1.11.13

snmpInTotalSetVars1.3.6.1.2.1.11.14

snmpInGetRequests1.3.6.1.2.1.11.15

snmpInGetNexts1.3.6.1.2.1.11.16

snmpInSetRequests1.3.6.1.2.1.11.17

snmpInGetResponses1.3.6.1.2.1.11.18

snmpInTraps1.3.6.1.2.1.11.19

snmpOutTooBigs1.3.6.1.2.1.11.20

snmpOutNoSuchNames1.3.6.1.2.1.1

_______________________________________________________________________________________“什麼?

SNMP可以抓到远端主机的CPU负载量?

!

”ㄏㄏ~~我第一次就是有这样的想法耶!

所以,我想对於第一次接触到SNMP的人应该也是会有相同的相法吧!

废话不多说以下便是我找了很多资料所整理出来的!

一般来讲,SNMP定义了一个叫做MIB(ManagementInformationBase,MIB)的管理物件库,MIB是一个按照层次结构组织的树状结构,其定义方式类似於功能变数名称系统,而OSI组织为树中每一层的每个节点定义唯一的一个数位标识,这样树中的每个节点都可以用从根开始到目的节点的相应的标识对应的一连串的数位来表示,如1.3.6.1.2.1.1表示了MIBII中系统组子树,而1.3.6.1.2.1.1.1.0表示系统组中的系统描述(sytemDescrption)物件。

每个物件的一连串数位表示被称为物件识别字(ObjectIndentifier,OID),我们便可利用OID来取出我们所需要的数值了。

看不懂吗?

?

没关系,以MRTG来远端监测CPU负载量统计来说,不懂SNMP、MIB、OID的关系没啥影响,还是可以透过我后面的资料来作便可完成,只是SNMP是个很有趣的协定,由於本篇文章的重点不是SNMP协定的介绍,所以请有兴趣的人除了可以参考O'Reilly所出的”SNMP网管实务”外,本篇文章后面我会将一些参考资料的网址写出,有兴趣的人可以看看了解一番。

接下来我将我整理出来的OID及其相关作用整理出来於后,希望对於需要的人有所帮助。

(注:

下面是我针对Redhat8.0内定的SNMP所整理出来的资料)1.PROCESSOR相关的MIB值:

.1.3.6.1.4.1.2021.10.1.3.xOID

MIB

DescriptionlaLoad.1

.1.3.6.1.4.1.2021.10.1.3.1

每隔1分钟CPU负载平均值laLoad.2

.1.3.6.1.4.1.2021.10.1.3.2

每隔5分钟CPU负载平均值laLoad.3

.1.3.6.1.4.1.2021.10.1.3.3

每隔15

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2