]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SNMP correction to the returned type of
authorhno <>
Fri, 2 May 2003 15:57:54 +0000 (15:57 +0000)
committerhno <>
Fri, 2 May 2003 15:57:54 +0000 (15:57 +0000)
cacheNumObjCount: Gauge32
cacheCurrentUnlinkRequests: Gauge32
cacheCurrentSwapSize: Gauge32
cacheClients: Gauge32

All was Counter32 which is not correct for gauges.. Counter32 should only
be used for ever increasing counters. If unsure one of the Integer types
can be used, not Counter.

src/mib.txt
src/snmp_agent.cc

index a9455e5c6b92836c0d676cd4af04f94134221fd5..1f3ea9afb97dec6e48367d698e8cafcddf56a828 100644 (file)
@@ -2,7 +2,7 @@
 
 SQUID-MIB DEFINITIONS ::= BEGIN
 --
--- $Id: mib.txt,v 1.27 2003/02/14 22:47:46 hno Exp $
+-- $Id: mib.txt,v 1.28 2003/05/02 09:57:54 hno Exp $
 --
 
 IMPORTS
@@ -212,7 +212,7 @@ squid MODULE-IDENTITY
         ::= { cacheSysPerf 6 }
 
        cacheNumObjCount OBJECT-TYPE
-                SYNTAX Counter32
+                SYNTAX Gauge32
                MAX-ACCESS read-only
                 STATUS  current
                 DESCRIPTION
@@ -228,7 +228,7 @@ squid MODULE-IDENTITY
         ::= { cacheSysPerf 8 }
 
         cacheCurrentUnlinkRequests OBJECT-TYPE
-                SYNTAX Counter32
+                SYNTAX Gauge32
                 MAX-ACCESS read-only
                 STATUS current
                DESCRIPTION
@@ -366,7 +366,7 @@ squid MODULE-IDENTITY
         ::= { cacheProtoAggregateStats 13 }
 
        cacheCurrentSwapSize OBJECT-TYPE
-                SYNTAX Counter32
+                SYNTAX Gauge32
                 MAX-ACCESS read-only
                 STATUS current
                DESCRIPTION
@@ -374,7 +374,7 @@ squid MODULE-IDENTITY
         ::= { cacheProtoAggregateStats 14 }
 
        cacheClients OBJECT-TYPE
-                SYNTAX Counter32
+                SYNTAX Gauge32
                 MAX-ACCESS read-only
                 STATUS current
                DESCRIPTION
index b5709a7102c0b496abdd5d5981893885e25721fe..8742e8e0cb8b71dfa34e4be71e0619688cffe9d5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.cc,v 1.87 2003/02/21 22:50:10 robertc Exp $
+ * $Id: snmp_agent.cc,v 1.88 2003/05/02 09:57:54 hno Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -343,7 +343,7 @@ snmp_prfSysFn(variable_list * Var, snint * ErrP)
     case PERF_SYS_CURUNLREQ:
         Answer = snmp_var_new_integer(Var->name, Var->name_length,
                                       (snint) statCounter.unlink.requests,
-                                      SMI_COUNTER32);
+                                      SMI_GAUGE32);
         break;
 
     case PERF_SYS_CURUNUSED_FD:
@@ -361,7 +361,7 @@ snmp_prfSysFn(variable_list * Var, snint * ErrP)
     case PERF_SYS_NUMOBJCNT:
         Answer = snmp_var_new_integer(Var->name, Var->name_length,
                                       (snint) StoreEntry::inUseCount(),
-                                      SMI_COUNTER32);
+                                      SMI_GAUGE32);
         break;
 
     default:
@@ -470,13 +470,13 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP)
         case PERF_PROTOSTAT_AGGR_CURSWAP:
             Answer = snmp_var_new_integer(Var->name, Var->name_length,
                                           (snint) store_swap_size,
-                                          SMI_COUNTER32);
+                                          SMI_GAUGE32);
             break;
 
         case PERF_PROTOSTAT_AGGR_CLIENTS:
             Answer = snmp_var_new_integer(Var->name, Var->name_length,
                                           (snint) statCounter.client_http.clients,
-                                          SMI_COUNTER32);
+                                          SMI_GAUGE32);
             break;
 
         default: