Hi
I am trying to spawn an snmptrap from python but i keep getting the following error
Invalid version specified after -v flag: 2c -c public 192.168.2.162 SNMPv2-SMI::enterprise s.3.1.1
here is the python code i am using
When i test the same command from the shell like this it works
snmptrap -v 2c -c public 192.168.2.162 SNMPv2-SMI::enterprise s.3.1.1
I tried to close the space between v and 2c so its like this -v2c but i still get the error.
I will appreciate it very much if you can help me correct this or point out to me what i am doing wrong.
Thanks
Kaf
I am trying to spawn an snmptrap from python but i keep getting the following error
Invalid version specified after -v flag: 2c -c public 192.168.2.162 SNMPv2-SMI::enterprise s.3.1.1
here is the python code i am using
Code:
from subprocess import Popen Popen(['snmptrap', '-v 2c -c public 192.168.2.162 SNMPv2-SMI::enterprises.3.1.1'])
snmptrap -v 2c -c public 192.168.2.162 SNMPv2-SMI::enterprise s.3.1.1
I tried to close the space between v and 2c so its like this -v2c but i still get the error.
I will appreciate it very much if you can help me correct this or point out to me what i am doing wrong.
Thanks
Kaf
Comment