Re: [snmpsim-users] device recording question
Brought to you by:
elie
|
From: Ilya E. <il...@gl...> - 2013-04-27 09:30:36
|
Hi Jason, I beg your pardon for such a glitchy code! I've tried to rework it to address the issues you have encountered. So I'd appreciate if you try the latest version once again: http://snmpsim.cvs.sourceforge.net/viewvc/snmpsim/snmpsim/variation/numeric.py Let me know in case of further issues. -ilya On Apr 25, 2013, at 7:21 PM, Jason Kojro-Badziak wrote: > Hi Ilya: > > I'm sorry, but looks like I'm getting the same error as before. Here is when I start the snmprec tool: > > ./snmprec.exe --agent-udpv4-endpoint=192.168.200.128 --version=2c --community=[COMMUNITY] --output-file="c:\Users\jkb\Desktop\vm-badziak.snmprec" --variation-module=numeric --variation-module-options=taglist:2-65-66-67-70,iterations:2,period:10 > Scanning "\Users\jkb\SNMP Simulator\Variation" directory for variation modules... no directory > Scanning "C:\Users\jkb\AppData\Roaming\SNMP Simulator\Variation" directory for variation modules... no directory > Scanning "C:\Program Files (x86)\SNMP Simulator\Variation" directory for variation modules... numeric module loaded > SNMP version 2c > Community name: [COMMUNITY] > Querying UDP/IPv4 agent at 192.168.200.128:161 > Initializing variation module: > numeric...OK > Sending initial GETNEXT request.... > OIDs dumped: 0/510 (<- this number keeps going up until 5000+) > > Then it changes to the below. (The "OIDs dumped:" line (from above) is getting changed into the "Shutting down variation modules:" line below): > > Shutting down variation modules: > numeric...OK > OIDs dumped: 5558, elapsed: 128.51 sec, rate: 3.00 OIDs/sec > numeric: waiting 0.00 sec(s), 5105 OIDs dumped, 1 iterations remaining... > Traceback (most recent call last): > File "snmprec.py", line 500, in <module> > KeyError: KeyError('value',) > > It does look like it's getting a little further now. The output file that is being created is now much longer then it was before the first update. (During this execution, I pressed the enter key every couple of seconds, which is why there are multiple "OIDs dumped:" lines.) > > Scanning "\Users\jkb\SNMP Simulator\Variation" directory for variation modules... no directory > Scanning "C:\Users\jkb\AppData\Roaming\SNMP Simulator\Variation" directory for variation modules... no directory > Scanning "C:\Program Files (x86)\SNMP Simulator\Variation" directory for variation modules... numeric module loaded > SNMP version 2c > Community name: [COMMUNITY] > Querying UDP/IPv4 agent at 192.168.200.128:161 > Initializing variation module: > numeric...OK > Sending initial GETNEXT request.... > OIDs dumped: 0/224 > OIDs dumped: 0/324 > OIDs dumped: 0/470 > OIDs dumped: 0/948 > OIDs dumped: 0/1861 > OIDs dumped: 0/2379 > OIDs dumped: 0/2639 > OIDs dumped: 0/2793 > OIDs dumped: 0/3005 > OIDs dumped: 0/3255 > OIDs dumped: 0/3494 > OIDs dumped: 0/3701 > OIDs dumped: 0/3858 > OIDs dumped: 0/4217 > OIDs dumped: 0/4423 > OIDs dumped: 0/4787 > OIDs dumped: 0/4934 > OIDs dumped: 1/5410 > OIDs dumped: 1/232 > OIDs dumped: 1/363 > Shutting down variation modules: > numeric...OK > OIDs dumped: 5491, elapsed: 143.79 sec, rate: 2.00 OIDs/sec > numeric: waiting 0.00 sec(s), 5110 OIDs dumped, 1 iterations remaining... > Traceback (most recent call last): > File "snmprec.py", line 500, in <module> > KeyError: KeyError('value',) > > > > > Thank you! > > Jason Kojro-Badziak > Email: jba...@mo... > > > -----Original Message----- > From: Ilya Etingof [mailto:il...@gl...] > Sent: Thursday, April 25, 2013 9:34 AM > To: Jason Kojro-Badziak > Cc: snm...@li... > Subject: Re: device recording question > > Hi Jason, > > Oh, yes, the numeric.py module I referred to is actually from (yet > unreleased) 0.2.2. Please, find the latest numeric.py without 0.2.2 dependency attached to this message. > > I hope to push a pre-release of 0.2.2 in a few days which would hopefully simplify things. > > -ilya > > On 04/25/13 18:13, Jason Kojro-Badziak wrote: >> Hi Ilya: >> >> I'm sorry, but now I'm getting a new error. Is there a more recent >> version of the simulator or other files that also need updating? I >> currently have 0.2.1 installed on my laptop. >> >> snmprec.exe --agent-udpv4-endpoint=192.168.200.128 >> --version=2c --community=[COMMUNITY] >> --output-file="c:\Users\jkb\Desktop\vm-badziak.snmprec" >> --variation-module=numeric >> --variation-module-options=taglist:2-65-66-67-70,iterations:2,period:1 >> 0 >> >> Here is what was returned: >> >> Scanning "\Users\jkb\SNMP Simulator\Variation" >> directory for variation modules... no directory >> >> Scanning "C:\Users\jkb\AppData\Roaming\SNMP >> Simulator\Variation" directory for variation modules... no directory >> >> Scanning "C:\Program Files (x86)\SNMP >> Simulator\Variation" directory for variation modules... >> >> variation module C:\Program Files (x86)\SNMP >> Simulator\Variation\numeric.py execution failure: cannot import name >> log >> >> I put the new "numeric.py" file into the "C:\Program Files (x86)\SNMP >> Simulator\Variation\" directory, renaming the old file to " >> _numeric._p_y_.backup" hoping that it does not get loaded when I run >> snmprec. >> >> Also just so you know: >> >>> snmprec.exe -h >> >> SNMP Simulator version 0.2.1, written by Ilya Etingof >> <il...@gl...> >> >> I also tried this update on my linux server and I am getting the same >> results: >> >> python /usr/bin/snmprec.py >> --agent-udpv4-endpoint=192.168.200.128 --version=2c --community=[COMMUNITY] >> --output-file="/opt/vm-badziak.snmprec" --variation-module=numeric >> --variation-module-options=taglist:2-65-66-67-70,iterations:2,period:1 >> 0 >> >> Output: >> >> Scanning "/root/.snmpsim/variation" directory for variation modules... >> no directory >> >> Scanning "/usr/share/snmpsim/variation" directory for variation >> modules... no directory >> >> Scanning >> "/usr/lib/python2.6/site-packages/snmpsim-0.2.2-py2.6.egg/snmpsim/variation" >> directory for variation modules... >> >> variation module >> /usr/lib/python2.6/site-packages/snmpsim-0.2.2-py2.6.egg/snmpsim/varia >> tion/numeric.py execution failure: cannot import name log >> >> The new file was put into the >> "/usr/lib/python2.6/site-packages/snmpsim-0.2.2-py2.6.egg/snmpsim/variation" >> directory. >> >> For some reason, I have a different version of the snmprec tool on my >> linux server: >> >> # python /usr/bin/snmprec.py -h >> >> SNMP Simulator version 0.2.2, written by Ilya Etingof >> <il...@gl...> >> >> Thank you for your assistance! >> >> Jason Kojro-Badziak >> >> Email: jba...@mo... >> >> -----Original Message----- >> From: Ilya Etingof [mailto:il...@gl...] >> Sent: Wednesday, April 24, 2013 5:21 PM >> To: Jason Kojro-Badziak >> Cc: snm...@li... >> Subject: Re: device recording question >> >> Hi Jason, >> >> That appeared to be a bug in numeric.py that is triggered by a >> *changing* set of OIDs between iterations. The quick fix is available >> from here: >> >> http://snmpsim.cvs.sourceforge.net/viewvc/snmpsim/snmpsim/variation/nu >> meric.py >> >> Please download this latest numeric.py file and replace your current >> numeric.py with it. >> >> Let me know in case of any issues. >> >> -ilya >> >> On Apr 25, 2013, at 12:55 AM, Jason Kojro-Badziak wrote: >> >>> Hi Ilya: >> >>> >> >>> Sorry to bother you, but I am having an issue when I try to use the >> snmprec application along with the recording module and I'm hoping you >> can help. If I use the snmprec tool without the "--variation" >> options, the snmprec file is created successfully. >> >>> >> >>> Here is the command I am running: >> >>> >> >>> c:\Program Files (x86)\SNMP Simulator>snmprec.exe >> --agent-udpv4-endpoint=192.168.200.128 --version=2c >> --community=[COMMUNITY STRING] >> --output-file="c:\Users\jkb\Desktop\vm-badziak.snmprec" >> --variation-module=numeric >> --variation-module-options=taglist:2-65-66-67-70,iterations:2,period:1 >> 0 >> >>> >> >>> When the applications starts, here is what I am initially seeing: >> >>> >> >>> Scanning "\Users\jkb\SNMP Simulator\Variation" >> directory for variation modules... no directory >> >>> Scanning "C:\Users\jkb\AppData\Roaming\SNMP >> Simulator\Variation" directory for variation modules... no directory >> >>> Scanning "C:\Program Files (x86)\SNMP >> Simulator\Variation" directory for variation modules... numeric module >> loaded >> >>> SNMP version 2c >> >>> Community name: [COMMUNITY STRING] >> >>> Querying UDP/IPv4 agent at 192.168.200.128:161 >> >>> Initializing variation module: >> >>> numeric...OK >> >>> Sending initial GETNEXT request.... >> >>> OIDs dumped: 0/(5000+) >> >>> >> >>> After what I am assuming is the first "run through" of all of the >> OIDs, the output changes to this: >> >>> >> >>> Scanning "\Users\jkb\SNMP Simulator\Variation" >> directory for variation modules... no directory >> >>> Scanning "C:\Users\jkb\AppData\Roaming\SNMP >> Simulator\Variation" directory for variation modules... no directory >> >>> Scanning "C:\Program Files (x86)\SNMP >> Simulator\Variation" directory for variation modules... numeric module >> loaded >> >>> SNMP version 2c >> >>> Community name: [COMMUNITY STRING] >> >>> Querying UDP/IPv4 agent at 192.168.200.128:161 >> >>> Initializing variation module: >> >>> numeric...OK >> >>> Sending initial GETNEXT request.... >> >>> Shutting down variation modules: >> >>> numeric...OK >> >>> OIDs dumped: 5136, elapsed: 181.08 sec, rate: 0.00 >> OIDs/sec >> >>> Traceback (most recent call last): >> >>> File "snmprec.py", line 500, in <module> >> >>> KeyError: KeyError('value',) >> >>> >> >>> In the resulting data file, there are a few lines, but there are >> not >> 5000+ OIDs dumped as it says in the output. >> >>> >> >>> Any idea what is going wrong? I have also tried this on the linux >> server and I am getting the same results. I have also tried using >> smaller taglists to see if that was the problem, but sadly, it is not. >> >>> >> >>> Just so you know: >> >>> c:\Program Files (x86)\SNMP Simulator>snmprec -h >> >>> SNMP Simulator version 0.2.1, written by Ilya Etingof >> <il...@gl... <mailto:il...@gl...>> >> >>> >> >>> Thank you! >> >>> Jason Kojro-Badziak >> >>> Email: jba...@mo... >> <mailto:jba...@mo...> >> >>> >> > |