[geeks] SNMP baby!

Phil Stracchino phil.stracchino at speakeasy.net
Sun Aug 14 16:15:02 CDT 2005


Patrick Giagnocavo 717-201-3366 wrote:
> On Sun, 2005-08-14 at 15:43, Phil Stracchino wrote:
> 
>>Now observe babylon5:eth0, and observe that all that incoming backup
>>traffic that, well ...  isn't there.
>>
>>ifconfig shows the incoming traffic, at a steady 2,000 packets or so per
>>second.  Procmeter3 shows the traffic.  But to snmpd, it seems to be
>>invisible.
>>
>>babylon5 is running Linux kernel 2.4.31 and ucd-snmp-4.2.6.
>>
>>Any clues....?
> 
> 
> Try using the command line tools on the linux machine itself to talk to the snmpd.  I have seen cases where some Linux utils break depending on kernel version.  Like snmpget'ing the counter value for eth0 .

snmpget babylon5 mrtg interfaces.ifTable.ifEntry.ifInUcastPkts.2 returns
the expected data, and does indeed show the packet count incrementing at
around 2K per second.

However, I did notice this anomaly below:

interfaces.ifTable.ifEntry.ifDescr.1 = lo
interfaces.ifTable.ifEntry.ifDescr.2 = eth0
interfaces.ifTable.ifEntry.ifDescr.3 = dummy0
interfaces.ifTable.ifEntry.ifType.1 = softwareLoopback(24)
interfaces.ifTable.ifEntry.ifType.2 = ethernetCsmacd(6)
interfaces.ifTable.ifEntry.ifType.3 = ethernetCsmacd(6)
interfaces.ifTable.ifEntry.ifMtu.1 = 16436
interfaces.ifTable.ifEntry.ifMtu.2 = 1500
interfaces.ifTable.ifEntry.ifMtu.3 = 1500
interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.2 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.3 = Gauge32: 10000000

SNMP for some reason thinks that's a 10-megabit interface.  If I try to
set it to 100Mbit:

babylon5:root:/opt/bacula/etc:35 # snmpset babylon5 [writecommunity]
interfaces.ifTable.ifEntry.ifSpeed.2 = 100000000
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifSpeed.2

OK, can't set it this way, the MIB doesn't recognize the variable, so I
can't use =, I have to specify type.

babylon5:root:/opt/bacula/etc:36 # snmpset babylon5 [writecommunity]
interfaces.ifTable.ifEntry.ifSpeed.2 i 100000000
interfaces.ifTable.ifEntry.ifSpeed.2: Bad variable type (Type of
attribute is Gauge32, not INTEGER)

Bummer, SNMP says it's a Guage32, and I have no variable type to set that.


Presumably, because the SNMP speed reported is incorrect, data showing a
higher transfer rate than that is discarded as "obviously incorrect"...?

Question is ... how do I correct that speed?



-- 
 Phil Stracchino       phil.stracchino at speakeasy.net
    Renaissance Man, Unix generalist, Perl hacker
 Mobile: 603-216-7037         Landline: 603-886-3518



More information about the geeks mailing list