PySNMP 是一个纯粹用Python实现的SNMP,用PySNMP的最抽象的API为One-line Applications,其中有两类API:同步的和非同步的,都在模块pysnmp.entity.rfc3413....oneliner.cmdgen 中实现,如下是Get方式与Walk方式的基本实现....当我们配置好客户端后,服务端就客户获取数据了,我们以一个OID序号为例,我们查询特定序号对应的名称,然后将其记录下来,例如下面这样。..., errorStatus, errorIndex, varBinds = next(iterator)
if errorIndication:
return..., errorStatus, errorIndex, varBinds) in nextCmd(SnmpEngine(),
CommunityData(self.region)