PySNMP学习笔记(二)
来源:互联网 发布:继电器仿真软件 编辑:程序博客网 时间:2024/06/06 04:13
ThevarBinds is a tuple of Managed Objects. ManagedObjects found in response are position-bound to Managed Objectnames passed in request. Each Managed Object is a tuple ofObject Name and ObjectValue.
如果只有一个oid参数,并且oid对应的信息只有一个(叶子节点?),则形如:
[(ObjectName('1.3.6.1.2.1.1.1.0'),
OctetString("'Linux my.domain.com 2.6.21 #2 Mon Mar 19 17:07:18 MSD 2006 i686'")) ]
如果oid对应的是一系列值(表?),则形如:
[
[(ObjectName('1.3.6.1.2.1.2.2.1.5.1'), Gauge32('1000000000'))],
[(ObjectName('1.3.6.1.2.1.2.2.1.5.2'), Gauge32('1000000000'))],
[(ObjectName('1.3.6.1.2.1.2.2.1.5.9'), Gauge32('1000000000'))],
[(ObjectName('1.3.6.1.2.1.2.2.1.5.89'), Gauge32('0'))]
]
可以看到,是由上面那种单独信息组成的list。
Object Value是类PyASN1或者其SNMP相关派生类的实例,这些类有:
- classInteger( value )
Create a SMIv2 Integer object. Thevalue parameter should be an integer value.Instances of this class mimic basic properties of a Pythoninteger.
- class Integer32( value )
Create a SMIv2 Integer32 object. This object issimilar to Integerclass instance.
- class OctetString( value)
Create a SMIv2 OctetString object. Thevalue parameter should be a string value.Instances of this class mimic basic properties of a Pythonstring.
- class IpAddress( value )
Create a SMIv2 IpAddress object. Thevalue parameter should be an IP address expressedin quad-dotted notation (e.g. "127.0.0.1").
- class Counter32( value )
Create a SMIv2 Counter32 object. Besidesdifferent value constraints, this object is similar to Integerclass instance.
- class Gauge32( value )
Create a SMIv2 Gauge32 object. Besidesdifferent value constraints, this object is similar to Integerclass instance.
- class Unsigned32( value)
Create a SMIv2 Unsigned32 object. Besidesdifferent value constraints, this object is similar to Integerclass instance.
- class TimeTicks( value )
Create a SMIv2 TimeTicks object. Besidesdifferent value constraints, this object is similar to Integerclass instance.
- class Opaque( value )
Create a SMIv2 Opaque object. This object issimilar to OctetString class instance.
- class Counter64( value )
Create a SMIv2 Counter64 object. Besidesdifferent value constraints, this object is similar to Integerclass instance.
- class Bits( value )
Create a SMIv2 Bits object. Thevalue parameter should be sequence of names ofbits raised to one. Unmentioned bits default to zero.
- PySNMP学习笔记(二)
- PySNMP学习笔记(一)
- PySNMP学习笔记(一)
- pysnmp学习(一)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 学习笔记(二)
- 一起学习PySNMP——理解什么是MIB
- pysnmp安装
- pysnmp官网
- C#学习笔记(二)
- PE学习笔记(二)
- centos自定义IP
- 华为9306 snmp OID
- 一起学习PySNMP——理解什么是MIB
- PySNMP学习笔记(一)
- 关于钥匙串
- PySNMP学习笔记(二)
- androidmanifest.xml权限中文说明
- C语言多线程同步 -- 信号量semaphore.h
- 华为9306查看光功率
- python 字符串/元组/列表/字典互转
- 华为数通产品MIB参考
- 将博客搬至CSDN
- linux shell 操作mysql
- linux下php支持snmp