[SQU] SNMP and MIB stuff (Re: bug #80)

From: James R Grinter <jrg@dont-contact.us>
Date: 01 Feb 2001 23:37:12 +0000

I've been dabbling a bit with file descriptors and Squid's SNMP,
saw bug #80, and it fitted in with something I noticed:

The MIB contains cacheCurrentUnusedFDescrCnt ('available number of
file descriptors') and cacheCurrentResFileDescrCnt ('reserved number
of file descriptors'), but doesn't have the third (which might be
total number of file descriptors configured, or unused file
descriptors, depending upon how you interpret it.)

2.2 implements:
       cacheCurrentUnusedFDescrCnt OBJECT-TYPE
                        " Available number of file descriptors "
       = Squid_MaxFD - Number_FD;

2.3 & 2.4-pre-stable implements:
       cacheCurrentUnusedFDescrCnt OBJECT-TYPE
                        " Available number of file descriptors "
       = Squid_MaxFD - Number_FD;

2.2 implements:
       cacheCurrentReservedFileDescrCount OBJECT-TYPE
                        " Reserved number of file descriptors "
       = Number_FD;

2.3 & 2.4-pre-stable implements:
       cacheCurrentResFileDescrCnt OBJECT-TYPE
                        " Reserved number of file descriptors "
       = Number_FD;

But, in src/stat.c:
        "Maximum number of file descriptors: %4d", Squid_MaxFD
        "Largest file desc currently in use: %4d", Biggest_FD
        "Number of file desc currently in use: %4d", Number_FD

        "Available number of file descriptors: %4d", fdNFree()
        "Reserved number of file descriptors: %4d", RESERVED_FD

(Note, the identifier names have changed between the MIB definition
shipped with 2.2 and 2.4 - that's a bit of an "SNMP no-no": but it
looks like it shipped in that changed form with 2.3. Not much we can
do but could it be avoided in the future?)

If no-one else is working on this, I might just have a go.

James.

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Thu Feb 01 2001 - 16:42:54 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:57:45 MST