diff options
Diffstat (limited to 'examples/v3arch/twisted/manager/cmdgen/get-v2c-custom-timeout.py')
-rw-r--r-- | examples/v3arch/twisted/manager/cmdgen/get-v2c-custom-timeout.py | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/examples/v3arch/twisted/manager/cmdgen/get-v2c-custom-timeout.py b/examples/v3arch/twisted/manager/cmdgen/get-v2c-custom-timeout.py index 246a1b9..e83e5e8 100644 --- a/examples/v3arch/twisted/manager/cmdgen/get-v2c-custom-timeout.py +++ b/examples/v3arch/twisted/manager/cmdgen/get-v2c-custom-timeout.py @@ -1,18 +1,20 @@ -# -# GET Command Generator -# -# Send a SNMP GET request -# with SNMPv2c, community 'public' -# using Twisted framework for network transport -# over IPv4/UDP -# to an Agent at 195.218.195.228:161 -# wait 3 seconds for response, retry 5 times (plus one initial attempt) -# for an OID in tuple form -# -# This script performs similar to the following Net-SNMP command: -# -# $ snmpget -v2c -c public -ObentU -r 5 -t 1 195.218.195.228 1.3.6.1.2.1.1.1.0 -# +""" +Fetch scalar value with timeout ++++++++++++++++++++++++++++++++ + +Send a SNMP GET request +* with SNMPv2c, community 'public' +* using Twisted framework for network transport +* over IPv4/UDP +* to an Agent at 195.218.195.228:161 +* wait 3 seconds for response, retry 5 times (plus one initial attempt) +* for an OID in tuple form + +This script performs similar to the following Net-SNMP command: + +| $ snmpget -v2c -c public -ObentU -r 5 -t 1 195.218.195.228 1.3.6.1.2.1.1.1.0 + +"""# from twisted.internet import reactor, defer from pysnmp.entity import engine, config from pysnmp.entity.rfc3413.twisted import cmdgen |