Re: changes to make mib.txt work with current net-snmp

2003-02-07 Thread David Luyer
You can make that more compact as:

SQUID-MIB DEFINITIONS ::= BEGIN
enterprises OBJECT IDENTIFIER ::= { iso org(3) dod(6) internet(1) private(4)
1 }
nlanr OBJECT IDENTIFIER ::= { enterprises 3495 }

(you can merge those two lines also, but that's going a bit far)

Although you shouldn't have to do it due to:

IMPORTS
enterprises [...]
FROM SNMPv2-SMI

And in fact if you are defining enterprises yourself, you shouldn't also
import it.  Are you sure your MIB path includes SNMPv2-SMI.txt?

David.
--
David Luyer Phone:   +61 3 9674 7525
Network Development ManagerP A C I F I CFax: +61 3 9699 8693
Pacific Internet (Australia)  I N T E R N E T   Mobile:  +61 4  BYTE
http://www.pacific.net.au/  NASDAQ:  PCNTF

- Original Message -
From: Duane Wessels [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 4:50 PM
Subject: changes to make mib.txt work with current net-snmp


 I find that a recent installation of net-snmp apparently does
 not parse Squid's mib.txt file until I make this change:

 --- SQUID-MIB.txt   Tue May 16 01:06:05 2000
 +++ SQUID-MIB.txt.new   Thu Feb  6 22:40:59 2003
 @@ -1,9 +1,14 @@
 -SQUID-MIB  { iso org(3) dod(6) internet(1) private(4) enterprises(1)
3495 }
 -
 -DEFINITIONS ::= BEGIN
 +SQUID-MIB DEFINITIONS ::= BEGIN
  --
  -- $Id: mib.txt,v 1.25 2000/05/16 07:06:05 wessels Exp $
  --
 +
 +orgOBJECT IDENTIFIER ::= { iso 3 }  --  iso = 1
 +dodOBJECT IDENTIFIER ::= { org 6 }
 +internet   OBJECT IDENTIFIER ::= { dod 1 }
 +privateOBJECT IDENTIFIER ::= { internet 4 }
 +enterprisesOBJECT IDENTIFIER ::= { private 1 }
 +

  IMPORTS
 enterprises, Unsigned32, TimeTicks, Gauge32, Counter32,



 Any SNMP-knowledgeable folks have an opinion on this change?






Re: changes to make mib.txt work with current net-snmp

2003-02-07 Thread Duane Wessels



On Fri, 7 Feb 2003, David Luyer wrote:

 You can make that more compact as:

 SQUID-MIB DEFINITIONS ::= BEGIN
 enterprises OBJECT IDENTIFIER ::= { iso org(3) dod(6) internet(1) private(4)
 1 }
 nlanr OBJECT IDENTIFIER ::= { enterprises 3495 }

 (you can merge those two lines also, but that's going a bit far)

 Although you shouldn't have to do it due to:

 IMPORTS
 enterprises [...]
 FROM SNMPv2-SMI

 And in fact if you are defining enterprises yourself, you shouldn't also
 import it.  Are you sure your MIB path includes SNMPv2-SMI.txt?

I'm not sure about anything when it comes to SNMP.

After copying mib.txt to $prefix/share/snmp/mibs, then running
snmpwalk (v5.0.7) I get:

% /tmp/local/bin/snmpwalk -v 1 -c public -m SQUID-MIB bo2:3401 squid
squid: Unknown Object Identifier (Sub-id not found: (top) - squid)

ktrace shows that snmpwalk reads my SQUID-MIB.txt file, but apparently
ignores it for some reason.

If I change the file so that it looks like this at the top:

SQUID-MIB  DEFINITIONS ::= BEGIN
enterprises OBJECT IDENTIFIER ::= { iso org(3) dod(6) internet(1) private(4)  1 }
nlanr OBJECT IDENTIFIER ::= { enterprises 3495 }

then it works better:

% /tmp/local/bin/snmpwalk -v 1 -c public -m SQUID-MIB bo2:3401 squid | head
SQUID-MIB::cacheSysVMsize.0 = INTEGER: 7996
SQUID-MIB::cacheSysStorage.0 = INTEGER: 19353283
SQUID-MIB::cacheUptime.0 = Timeticks: (80748) 0:13:27.48
...

(I guess the -m SQUID-MIB is unnecessary anyway)

Also note that if I use -v 2c instead, I get no response from Squid.
Actually, tcpdump shows Squid sending replies, but snmpwalk ignores
them and reports:

Timeout: No Response from bo2:3401