Re: [snmpsim-users] snmpbulkget outpu in version 0.2.2
Brought to you by:
elie
|
From: Ilya E. <il...@gl...> - 2013-06-01 21:32:45
|
Hi Yateen, As a side note, the most recent development version includes 'datafile.py' tool which can be helpful for data file maintenance operations. You could split/merge data files, sort/de-duplicate data file records so that simulator won't behave strangely due to malformed or unsorted records in data files. The tool also support data file formats conversion: $ scripts/datafile.py --help Usage: scripts/datafile.py [--help] [--quiet] [--sort-records] [--ignore-broken-records] [--deduplicate-records] [--start-oid=<OID>] [--stop-oid=<OID>] [--source-record-type=<type>] [--destination-record-type=<type>] [--input-file=<filename>] [--output-file=<filename>] Example run: $ scripts/datafile.py --input-file=135.250.33.68.snmprec --ignore-broken-records --sort-records --deduplicate-records --output-file=135.250.33.68-fixed.snmprec # Skipping broken record <1.3.6.1.4.1.637.74.1.2.8.1.1.1.1.7.135.250.18.154.162|130|No more variables left in this MIB View> # Skipping duplicate record <1.3.6.1.4.1.637.74.1.2.4.1.2.1.3.1.11.11.1.9999.40> ... # Records: written 26520, filtered out 0, deduplicated 205, broken 1, variated 1 CVS snapshot download link: http://snmpsim.cvs.sourceforge.net/viewvc/snmpsim/snmpsim/?view=tar -ilya On May 31, 2013, at 11:24 AM, Bhagat, Yateen (Yateen) wrote: > Hi Ilya, > > > I tried bulkget on plain .snmprec , but still got the same results. > The snmprecfile and the bulkget response capture from wireshark are attached here. > > Note : this time too I got 28 varbinds against expected 35. > > Thanks > Yateen > > -----Original Message----- > From: Ilya Etingof [mailto:il...@gl...] > Sent: Friday, May 31, 2013 1:57 AM > To: Bhagat, Yateen (Yateen) > Cc: snm...@li...; KARNAM, Mahendra (Mahendra) > Subject: Re: snmpbulkget outpu in version 0.2.2 > > Hi Yateen, > > First thing that come to mind is that you may not have all the OIDs in your SQL DB. Could you make sure the following table contains OIDs you expect to see in response: > > select oid from snmprec order by oid > > If that does not explain the problem, could you send me the sqlite .db file in question? > > Does this issue show up when using plain .snmprec, not SQL DB? > > -ilya > > On May 30, 2013, at 4:13 PM, Bhagat, Yateen (Yateen) wrote: > >> Hi Ilya >> >> I have observed that the snmpbulkget request output from snmpsim is not in proper order. >> >> Our snmp manager sends a bulkget request for "particular OIDs and repeat count" as shown in the perl snippet below: >> >> $max_reps=5; >> $alarmSeqNo=272164; >> $result = $session->get_bulk_request( >> -maxrepetitions => $max_reps, >> -varbindlist => [ >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.$alarmSeqNo", >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.$alarmSeqNo", >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.6.$alarmSeqNo", >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.2.$alarmSeqNo", >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.7.$alarmSeqNo", >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.5.$alarmSeqNo", >> "1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.$alarmSeqNo", >> ], >> ); >> >> The real SNMP agent node returns the response as under ( as seen in >> wireshark) >> >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.272165' => 2322, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.272165' => '11#3', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.6.272165' => '0x07dd051e091a1900', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.2.272165' => 39, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.7.272165' => 1, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.5.272165' => 1, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.272165' => '', >> ------------ >> ------------ >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.272169' => 2322, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.272169' => '11#3', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.6.272169' => '0x07dd051e091a1900', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.2.272169' => 39, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.7.272169' => 1, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.5.272169' => 1, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.272169' => '', >> >> Note : 1. The OIDs are returned in the same order as specified in the request (ref perl snippet) >> 2. The number of OIDs returned = 7*5=35 as expected ( request >> has 7 OIDs and repeat count of 5) >> >> However when the same bulkget request is sent to the snmpsim, the response is different as under: >> >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.272165' => 2322, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.272166' => 2322, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.272167' => 2322, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.3.272168' => 2322, >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.272165' => '11#1', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.272166' => '11#3', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.272167' => '11#0', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.4.272168' => '11#0' >> --------- >> --------- >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.272165' => '', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.272166' => '', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.272167' => '', >> '1.3.6.1.4.1.637.74.1.2.2.1.1.1.4.1.10.272168' => '', >> >> Note : 1. The OIDs are returned in an order DIFFERENT from one >> specified in the request (ref perl snippet) 2. The number of OIDs returned is not 7*5=35 as expected it retuned only 28 , OIDs for the last index number >> 272169 were missing >> >> Please help ! >> >> Regards >> Yateen > > <StaticSnmpsim_getBul_response.bmp><135.250.33.68.snmprec> |