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 failure occured
> Failed object: RAINBOW-SERVICES-MIB::rbQoSProfileType.24
>
But I know why there is an error here. In fact, in the table the index goes
from 1 to 17 and then skip to 25. So there is no entry for 18 to 24. Here is
the same shell command as above but with the 17th index :
snmpget -v 2c -c private 10.0.0.1 rbQoSProfileType.24
>
and the result :
RAINBOW-SERVICES-MIB::rbQoSProfileType.17 = INTEGER: rbBE(3)
Then :
snmpgetnext -v 2c -c private 10.0.0.1 rbQoSProfileType.17
>
and the result :
RAINBOW-SERVICES-MIB::rbQoSProfileType.25 = INTEGER: rbRT(1)
>
These shell commands work, so I continue with my script (and I replace 24 by
17, as explained above) :
import netsnmp
>
> profileNb = "17"
> qosType = "0"
> value = "rbQoSProfileType"
>
> oid = netsnmp.Varbind(value, profileNb, qosType)
> result = netsnmp.snmpget(oid, DestHost = "10.0.0.1", Community = "private",
> Version = 2)
> print("%s") %(result)
>
And this script crashes. It also gives segmentation fault.
Now with GETNEXT :
import netsnmp
>
> profileNb = "17"
> qosType = "0"
> value = "rbQoSProfileType"
>
> oid = netsnmp.Varbind(value, profileNb, qosType)
> result = netsnmp.snmpgetnext(oid, DestHost = "10.0.0.1", Community =
> "private", Version = 2)
> print("%s") %(result)
>
The result is still the same, it crashes with segmentation fault.
Thank you
2009/7/8 Dave Shield <d.t.shi...@liverpool.ac.uk>
> 2009/7/8 François Dumont <francoisdumon...@gmail.com>:
> > 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", Community =
> >> "private", Version = 2)
> >> print("%s") %(result)
> >
> > It gives the segmentation fault.
>
> OK -good.
>
> Now - the next things to try are:
>
> - The shell command
> "snmpget -v 2c -c private 10.0.0.1 rbQoSProfileType.25"
> - The shell command
> "snmpget -v 2c -c private 10.0.0.1 rbQoSProfileType.24"
> - The shell command
> "snmpgetnext -v 2c -c private 10.0.0.1
> rbQoSProfileType.24"
>
> What results do you see from these two?
>
> Then tweak the script above to read
>
> profileNb = "24"
>
> and run it again. Does it crash or not?
> Now tweak it to read
>
> result = netsnmp.snmpgetnext( .... )
>
> and run it again. Does it crash or not?
>
> Dave
>
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users