Re: Still some more problems using python module

Jack G Atkinson Jr <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Okay,
I'm not looping, I'm calling the script over and over again from the 
python shell.

2nd,  I can create up to thousands of rows (Is integer 16 bit or 32 
bit?) without activating them if I want (theoretically) until I overlap 
the next index or run out of memory.  I know for sure that I've done the 
this at least 30 times without activating, before with no problem from 
other SNMP software, so 10+ shouldn't be a problem.

I have done a little more investigating, and it seems to consistently 
fail when I go from a one digit index to two digits.  I did this 
repeatedly by deleting all the rows after a failure.  I'm trying to look 
at the string creation part and the hand off to the netsnmp command at 
the lower level, and see if something is going wrong.  For the life of 
me, I can't see why that extra digit is making a difference.

BTW, thanks for all your help and suggestions so far Mike and Dave.

Examples:
#----when it goes from "9" to "13" it bombs.
In [7]: run testscript.py
adGenEasyBridgeIndexNext.0
1
adGenEasyBridgeRowStatus.1
adGenEasyBridgeStatusString.1
('Not Activated',)

In [8]: run testscript.py
adGenEasyBridgeIndexNext.0
3
adGenEasyBridgeRowStatus.3
adGenEasyBridgeStatusString.3
('Not Activated',)

In [9]: run testscript.py
adGenEasyBridgeIndexNext.0
4
adGenEasyBridgeRowStatus.4
adGenEasyBridgeStatusString.4
('Not Activated',)

In [10]: run testscript.py
adGenEasyBridgeIndexNext.0
5
adGenEasyBridgeRowStatus.5
adGenEasyBridgeStatusString.5
('Not Activated',)

In [11]: run testscript.py
adGenEasyBridgeIndexNext.0
6
adGenEasyBridgeRowStatus.6
adGenEasyBridgeStatusString.6
('Not Activated',)

In [12]: run testscript.py
adGenEasyBridgeIndexNext.0
7
adGenEasyBridgeRowStatus.7
adGenEasyBridgeStatusString.7
('Not Activated',)

In [13]: run testscript.py
adGenEasyBridgeIndexNext.0
8
adGenEasyBridgeRowStatus.8
adGenEasyBridgeStatusString.8
('Not Activated',)

In [14]: run testscript.py
adGenEasyBridgeIndexNext.0
9
adGenEasyBridgeRowStatus.9
adGenEasyBridgeStatusString.9
('Not Activated',)

In [15]: run testscript.py
adGenEasyBridgeIndexNext.0
13
adGenEasyBridgeRowStatus.13
error: set: unknown object ID 
(adGenEasyBridgeRowStatus.13)adGenEasyBridgeStatu
String.13
error: get: unknown object ID (adGenEasyBridgeStatusString.13)None

In [16]: run testscript.py
adGenEasyBridgeIndexNext.0
14
adGenEasyBridgeRowStatus.14
error: set: unknown object ID 
(adGenEasyBridgeRowStatus.14)adGenEasyBridgeStatu
String.14
error: get: unknown object ID (adGenEasyBridgeStatusString.14)None


#---- Here it is again, notice when it hits "10" it bombs"
In [1]: run testscript.py
adGenEasyBridgeIndexNext.0
7
adGenEasyBridgeRowStatus.7
adGenEasyBridgeStatusString.7
('Not Activated',)

In [2]: run testscript.py
adGenEasyBridgeIndexNext.0
8
adGenEasyBridgeRowStatus.8
adGenEasyBridgeStatusString.8
('Not Activated',)

In [3]: run testscript.py
adGenEasyBridgeIndexNext.0
9
adGenEasyBridgeRowStatus.9
adGenEasyBridgeStatusString.9
('Not Activated',)

In [4]: run testscript.py
adGenEasyBridgeIndexNext.0
10
adGenEasyBridgeRowStatus.10
error: set: unknown object ID 
(adGenEasyBridgeRowStatus.10)adGenEasyBridgeStatus
String.10
error: get: unknown object ID (adGenEasyBridgeStatusString.10)None

In [5]: run testscript.py
adGenEasyBridgeIndexNext.0
11
adGenEasyBridgeRowStatus.11
error: set: unknown object ID 
(adGenEasyBridgeRowStatus.11)adGenEasyBridgeStatus
String.11
error: get: unknown object ID (adGenEasyBridgeStatusString.11)None

In [6]: run testscript.py
adGenEasyBridgeIndexNext.0
12
adGenEasyBridgeRowStatus.12
error: set: unknown object ID 
(adGenEasyBridgeRowStatus.12)adGenEasyBridgeStatus
String.12
error: get: unknown object ID (adGenEasyBridgeStatusString.12)None


Mike Ayers wrote:
>> From: Jack G Atkinson Jr [mailto:[email protected]] 
>> Sent: Tuesday, January 22, 2008 12:47 PM
>>     
>
>   
>> Okay, the python works to degree, but after a while it quits. 
>>  Here's a sample of running the same test script (source code 
>> after transcipt) over and over.  It worked 4 times, then no 
>> longer functions.  I can still run it just fine from the 
>> cygwin prompt using normal netsnmp commands.
>>     
>
> 	I can't support the python bindings myself, but let's see what we can discover...
>
> 	First, your script as posted has no looping construct.  How are you looping?  Shell script?
>
> 	Second, your script is creating rows but not activating them.  I'm not sure I would consider that an infinitely repeatable operation.  Each potential row takes up space from what is probably a fixed pool of management resources which may not be shared with the operational resources.  Try adding
>
> #Delete Row
> SnmpSet(genEasyBridgeRowStatus,res[0],6,'INTEGER')
>
> to the end of the script, so that you don't leave malingerers.
>
>
> 	HTH,
>
> Mike
>
>   


-- 
------------------------------------------------------------------
Jack G. Atkinson Jr.
[email protected]
Romans 5:6-10 - God loved us while we were unlovable!
Luke 12:36-47 - Be ready!
------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.