Python is so great. I've been creating a small set of objects to get some
stats from our adsl routers. So far it works great and fast. However, in the
shell script I created over a year ago to gather stats I do:
mib_lp=`$snmpwalk $ip_address public
Index 2>/dev/null | $grep " = $lan_iface" | $head -1 | $sed -E
e.ipAddrEntry.ipAdEntIfIndex.(.+) = .*/\1/g'`
if [ "$mib_lp" != "" ]; then
lan_ip=`$snmpget $ip_address public
ddr.$mib_lp 2>/dev/null | $sed -E 's/.+IpAddress: //g'`
lan_netmask=`$snmpget $ip_address public
dEntNetMask.$mib_lp 2>/dev/null| $sed -E 's/.+IpAddress: //g'`
To retrieve the lan settings for the router. I don't know the (lan)ip
address of it but do know the interface number, that's why I check for that
and then use a part of the mib to get to the netmask.
This seems to be quite difficult with pysnmp (took me half an hour to write
Router.SNMPQuery(self, noid) ), so before I get started I wanted to ask
if somebody might have better idea for this.
Sorry for the multiple posts, that was _not_ on purpose.
Axel Scheepers wrote:
> Oh damn.
> Sorry for the multiple posts, that was _not_ on purpose.
Judging by the new text at the top of the python.org web site,
this is not likely your fault. (And I've seen several other
repeates just now.)
"""python.org mail system is sick
Yes, we know about it. Yes, we're working on it.
Please don't bug us; we'll get the work done faster.