Re: Segmentation fault

2009-07-22 Thread François Dumont
I have fixed my problem :) In fact, there is a dependency between the parameters in the row. I knew that but I was unable to know how to do to set the parameters. I just did an snmpset with all the parameters I want in the same command, like : snmpset -c private -v 2c 10.0.0.1 rbQoSProfileType.2

Re: Segmentation fault

2009-07-17 Thread Dave Shield
2009/7/17 François Dumont : > I thought my problem was in my python script or in the python library my > script uses, but I think this is a general problem (because it also happens > with a simple snmpset in command shell). If it fails with a "snmpset" command, then it sounds like the problem is w

Re: Segmentation fault

2009-07-17 Thread François Dumont
In fact I used "i" option to set the paramater. But I tried with "=" and it's the same (Error in packet. Reason: undoFailed), and also with "u", it tells me that it is an INTEGER and not Unsigned32. In addition, I have these error messages while trying to set the parameter to 0, 2 or 3. When I try

Re: Segmentation fault

2009-07-16 Thread Vincent Bernat
OoO Lors de la soirée naissante du mercredi 15 juillet 2009, vers 17:34, François Dumont disait : > You say (Vincent Bernat) that it is a problem with my MIB module, and I > believe > you. But I have installed an SNMP-based GUI (Loriot Pro), just to verify, and > I > can modify these parameters

Re: Segmentation fault

2009-07-15 Thread Vincent Bernat
OoO Lors de la soirée naissante du mercredi 15 juillet 2009, vers 17:34, François Dumont disait : > You say (Vincent Bernat) that it is a problem with my MIB module, and I > believe > you. But I have installed an SNMP-based GUI (Loriot Pro), just to verify, and > I > can modify these parameters

Re: Segmentation fault

2009-07-15 Thread François Dumont
You say (Vincent Bernat) that it is a problem with my MIB module, and I believe you. But I have installed an SNMP-based GUI (Loriot Pro), just to verify, and I can modify these parameters... And the MIBs are the same. So, I am wondering why ? Thank you 2009/7/15 Vincent Bernat > OoO En ce débu

Re: Segmentation fault

2009-07-15 Thread Vincent Bernat
OoO En ce début d'après-midi ensoleillé du mercredi 15 juillet 2009, vers 15:48, François Dumont disait : > I still have this problem of set. I tried to analyze the packets with > Wireshark > (I started 2 captures with both my python script and a simple snmpset in > command shell, like I sai

Re: Segmentation fault

2009-07-15 Thread François Dumont
Hi everybody, I still have this problem of set. I tried to analyze the packets with Wireshark (I started 2 captures with both my python script and a simple snmpset in command shell, like I said in the previous email), and the only thing I saw is that there is an error returned from the agent : und

Re: Segmentation fault

2009-07-13 Thread François Dumont
Hi everybody, It seems that I've found a piece of information from debugging myscript. I have the error : XXX sync PDU: undoFailed I tried to set the value of rbQoSProfileType (which is 0 at the moment) to 1, 2 or 3 by a simple request in command shell (not by my script) : m...@sumac-clusterhe

Re: Segmentation fault

2009-07-13 Thread François Dumont
> > > Secondly, for the parameters rbQoSProfileType and rbQoSProfileParamTime, > the > > value is always 0 and I can't change it. Why ? Here is the extraxt of the > MIB > > which deals with these parameters. > > Does this work with snmpset? > When I say I can't change this value, I mean that an sn

Re: Segmentation fault

2009-07-11 Thread Vincent Bernat
OoO En cette fin de matinée radieuse du vendredi 10 juillet 2009, vers 11:00, François Dumont disait : > First of all, these types are given by the MIB, but when I print them in my > python script with : > value = "rbQoSProfileName" > print(type(value)) > value = "rbQoSProfileTyp

Re: Segmentation fault

2009-07-10 Thread François Dumont
Hi everybody, Now that I don"t have the library problem anymore, I have some trouble to set 2 parameters in my table. Here is my python script : http://pastebin.ca/1490519. I repeat all the parameters with their type : rbQoSProfileName : OCTET_STRING rbQoSProfileType : INTEGER rbQoSProfileParam1

Re: Segmentation fault

2009-07-09 Thread Vincent Bernat
OoO Pendant le temps de midi du jeudi 09 juillet 2009, vers 12:11, Dave Shield disait : >> I'm using the library libsnmp-python available in the depositories of >> Ubuntu. The version of this library is 5.4.1~dfsg-4ubuntu4.2. > Hmmm this code affected by this patch doesn't seem to be prese

Re: Segmentation fault

2009-07-09 Thread François Dumont
Ok, now my script works. I have tried to display all parameters of an index in the table of QoS Profiles (name, type, param1, param2, paramTime and rowStatus) and it works too. Now I will try to set these parameters (looking at the MIB, because I think there is an order to set the parameters). Th

Re: Segmentation fault

2009-07-09 Thread Dave Shield
2009/7/9 François Dumont : > I installed the setuptools package for ubuntu (named python-setuptools) and > then did again : > >> m...@sumac-clusterhead-1:~/net-snmp-5.4.2.1/python$ python setup.py build > > I have lots of errors, so I posted it on pastebin again : > http://pastebin.ca/1489465 > > I

Re: Segmentation fault

2009-07-09 Thread François Dumont
I installed the setuptools package for ubuntu (named python-setuptools) and then did again : m...@sumac-clusterhead-1:~/net-snmp-5.4.2.1/python$ python setup.py build > I have lots of errors, so I posted it on pastebin again : http://pastebin.ca/1489465 It seems that nothing is good :/ Thank yo

Re: Segmentation fault

2009-07-09 Thread François Dumont
When trying that : cd python > python setup.py build > sudo python setup.py install I have this problem : m...@sumac-clusterhead-1:~/net-snmp-5.4.2.1$ cd python/ > m...@sumac-clusterhead-1:~/net-snmp-5.4.2.1/python$ python setup.py build > Traceback (most recent call last): > F

Re: Segmentation fault

2009-07-09 Thread Dave Shield
2009/7/9 François Dumont : >>     Have you tried applying the patch mentioned in that bug report? >>     It's a one-line change to the file 'python/netsnmp/client_intf.c' >>   (Though you would also need to recompile/install the python module) >> >>     Dave > > I'm using the library libsnmp-py

Re: Segmentation fault

2009-07-09 Thread François Dumont
I'm sorry, i did a mistake, each time I say client.py, you should read client_intf.c Sorry about that. 2009/7/9 François Dumont > Hi everybody, > > I'm using Ubuntu 8.04 (Hardy), up to date. > > I think that you should run your script with gdb: >> >> $ gdb python >> gdb> set args yourscript.py

Re: Segmentation fault

2009-07-09 Thread François Dumont
Hi everybody, I'm using Ubuntu 8.04 (Hardy), up to date. I think that you should run your script with gdb: > > $ gdb python > gdb> set args yourscript.py > gdb> run > [it crashes] > gdb> bt full > > And post the result. > To be clear, here is the python script I used with gdb : import netsnmp >

Re: Segmentation fault

2009-07-09 Thread Dave Shield
2009/7/8 François Dumont : > Going back to the simple script at the very top of this mail, I found on > this page http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497656 the same > problem as mine. This is a bug reported for Debian, and I am under Ubuntu > 8.04 completely updated. So there should b

Re: Segmentation fault

2009-07-08 Thread Vincent Bernat
OoO Lors de la soirée naissante du mercredi 08 juillet 2009, vers 18:50, François Dumont disait : > Two information to add to my problem : > First, I didn't notice that, but the problem appears only with enumerated > types. > Secondly, I have debugged the script with pdb and it shows that it cra

Re: Segmentation fault

2009-07-08 Thread François Dumont
Two information to add to my problem : First, I didn't notice that, but the problem appears only with enumerated types. Secondly, I have debugged the script with pdb and it shows that it crashes in the file client.py when putting the type (INTEGER) into a list called self.__dict__ (line 60 of thi

Re: Segmentation fault

2009-07-08 Thread François Dumont
So, first this shell command : snmpget -v 2c -c private 10.0.0.1 rbQoSProfileType.25 and the result : RAINBOW-SERVICES-MIB::rbQoSProfileType.25 = INTEGER: rbRT(1) Then : snmpget -v 2c -c private 10.0.0.1 rbQoSProfileType.24 and the result : Error in packet > Reason: (genError) A general f

Re: Segmentation fault

2009-07-08 Thread Dave Shield
2009/7/8 François Dumont : > I confirm that with this script (there is nothing else in the script except > this) : > >>    import netsnmp >> >>    profileNb = "25" >>    qosType = "0" >>    value = "rbQoSProfileType" >> >>    oid = netsnmp.Varbind(value, profileNb, qosType) >>    result = netsnmp.s

Re: Segmentation fault

2009-07-08 Thread François Dumont
I confirm that with this script (there is nothing else in the script except this) : import netsnmp > >profileNb = "25" >qosType = "0" >value = "rbQoSProfileType" > >oid = netsnmp.Varbind(value, profileNb, qosType) >result = netsnmp.snmpget(oid, DestHost = "10.0.0.1", Communi

Re: Segmentation fault

2009-07-08 Thread Dave Shield
2009/7/8 François Dumont : > This is the initial GET that crashes. OK - it sounds as if a trivial script with *just* a single GET request should still crash. Nothing else - no prompting, no SET requests, nothing. Just something like: import netsnmp profileNb = "25" qosType = "0"

Re: Segmentation fault

2009-07-08 Thread François Dumont
This is the initial GET that crashes. In fact, I noticed that before, but I used snmpwalk instead with the following line : print("Type = %s") %(result, ) and it printed : rbQoSProfileType 25 = None ( None ) I am wondering why a GET crashes while a WALK doesn't (but doesn't give the correct ans

Re: Segmentation fault

2009-07-08 Thread Dave Shield
2009/7/8 François Dumont : > I reduced the python script to this : > >> qosType = raw_input("Enter the new type (0 = rbCG, 1 = rbRT, 2 = rbNRT, 3 >> = rbBE) :\n") >> value = "rbQoSProfileType" >> oid = netsnmp.Varbind(value, profileNb, qosType) >> resultSet = netsnmp.snmpset(oid, DestHost = "10.0.0

Re: Segmentation fault

2009-07-08 Thread François Dumont
2009/7/8 Dave Shield >[ First - *please* don't mail me privately, without copying > any responses to the mailing list. I don't have the time > or inclination to offer private, unpaid, SNMP consultancy. > Keep discussions to the list, where others can both learn > and offer ad

Re: Segmentation fault

2009-07-08 Thread Dave Shield
[ First - *please* don't mail me privately, without copying any responses to the mailing list. I don't have the time or inclination to offer private, unpaid, SNMP consultancy. Keep discussions to the list, where others can both learn and offer advice. Thanks. ] 2009/7/

Re: Segmentation fault

2009-07-07 Thread Dave Shield
2009/7/6 Mike Ayers : >        I notice that you are stting each variable twice in succession Actually, the code seems to be issuing a SET followed by a GET (presumably to check whether the assignment worked). This shouldn't cause any problems. I'm not familiar with the python interface, so I c

RE: Segmentation fault

2009-07-06 Thread Mike Ayers
> From: François Dumont [mailto:francoisdumon...@gmail.com] > Sent: Friday, July 03, 2009 1:33 AM > I'm trying to set some parameters of QoS Profile and I have > some problems. In fact, in my script, I want to change 6 > parameters but only 3 don't give segmentation fault. > > Here is the scri

Re: Segmentation fault problem

2008-07-11 Thread Miljen Mikić
Thank you for your help, but unfortunately it didnt solve the problem. I put HANDLER_CAN_RONLY (HANDLER_CAN_READ causes compile-time error) but there is still segmentation fault. There are two things that are maybe interesting to mention: 1) Segmentation fault arises even if I avoid handlers, for

RE: Segmentation fault problem

2008-07-11 Thread Syed Mujtaba Ahmed Razvi
Miljen, I think your code snippet is trying to access a memory location that it is not allowed to access. For e.g. you might be writing some illegal location using some pointer (may be one of them my_test,my_test2). Try changing the HANDLER_CAN_RWRITE in the declaration portion to HANDLER_CAN

Re: Re: segmentation fault (LEAF MIB)

2008-04-07 Thread Dave Shield
On 7 Apr 2008 10:52:12 -, <[EMAIL PROTECTED]> wrote: > when i did snmpget for particular obj in that mib > it says no such object What is the *exact* command you gave? What does the LEAF-MIB look like? What does the leaf.c code file look like? Dave --

Re: Re: segmentation fault (LEAF MIB)

2008-04-07 Thread yogesh marathe
yes it is ./configure --with-mib-modules=leaf it takes leaf module properly but when i did snmpget for particular obj in that mib it says no such object On Mon, 07 Apr 2008 Dave Shield wrote : >On 4 Apr 2008 05:39:01 -, <[EMAIL PROTECTED]> wrote: > > i used env option in mib2c and mi

Re: segmentation fault (LEAF MIB)

2008-04-07 Thread Dave Shield
On 4 Apr 2008 05:39:01 -, <[EMAIL PROTECTED]> wrote: > i used env option in mib2c and mib2c.scalar.conf to create leaf.c and leaf.h > files. > then i put these files in /agent/mibgroup > > i did > net-snmp5.4.1>make clean > net-snmp5.4.1>./configure --with-MIB-modules="path of leaf.txt/lea

RE: segmentation fault on simple table agent

2008-04-02 Thread Mike Ayers
[I'll assume that you (or I) had mailer problems and that you did not intentionally send this three times in an hour. That would be rude.] > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Denny Zulfikar > Sent: Tuesday, April 01, 2008 11:52 PM > I am new in this l

Re: Segmentation fault when start net-snmp

2007-01-29 Thread Dave Shield
On 29/01/07, tran vanle <[EMAIL PROTECTED]> wrote: > I build net-snmp-5.2.1.2.tar.gz First thing - that is a relatively old version of the software, and there have been several releases since then. Two on the 5.2.x line (currently at 5.2.3), and several versions of more updated code. It would b

Re: Segmentation Fault in Subagent

2004-07-30 Thread Wes Hardaker
> On Thu, 29 Jul 2004 17:21:41 -0400, "Reitberger, Susan" <[EMAIL PROTECTED]> said: Susan> I am running the main agent and a subagent which communicate Susan> via the agentx protocol. When I try to set a read-only variable Susan> that the subagent is responsible for, the nonWritable error Susa