I spent a month lasy year examining the Squid mib and configuring our MRTG
graphs for squid. In the course of that month, I developed the document
below for my own use.
I hope it's correct, but I don't guarantee the definitions. If anyone has
comments or suggestions or improvements, I'd love to hear them.
Scott Prater
Dpto. Desarrollo de Servicios y Proyectos
sprater@servicom2000.com
SERVICOM 2000
Av. Primado Reig, 189 entlo.
46020 Valencia - Spain
Tel. (+34) 96 332 12 00
Fax. (+34) 96 332 12 01
www.servicom2000.com
### squid-snmp-vars.doc
All of the variables refer to Squid 2.3, Stable 2, and the mib.txt
distributed with it.
1) System statistics
cacheSysVMsize: Size in KB of the object storage area in memory. Squid's
virtual memory is used as an in-memory cache for frequently requested
objects. Same as "Cache information for squid: Storage Mem size" value in
cachemgr "General Runtime Statistics" display. Will probably not match ps
output (see FAQ).
cacheSysStorage: Size in KB of cache stored on disk. Same as "Cache
information for squid: Storage Swap size" line in cachemgr "General Runtime
Statistics" display. Won't match "du" output.
2) Performance statistics
cacheMemUsage: Amount of memory in KB currently tracked by squid process.
Equivalent to the "Memory accounted for: Total accounted" value in the
cachemgr "General Runtime Statistics" display.
cacheNumObjCount: Number of objects known to squid. Includes objects on
disk, in memory, and in-transit. Should be equivalent to "Internal Data
Structures: Store Entries" value in cachemgr "General Runtime Statistics"
display.
(Note: The "Store Entries" value is always 1 or 2 higher, yet, when I
looked at the source code, it looks as if cachemgr and snmp_agent get their
values from the exact same variable. Are two store entries created then
destroyed when the cachemgr.cgi program is called?)
To derive the Mean Object Size, divide cacheSysStorage by cacheNumObjCount.
3) Aggregate statistics
a) traffic between server and the outside world
cacheServerRequests: Number of requests server has sent to outside world.
Equivalent to "server.all.requests" in cachemgr "Traffic and Resource
Counters" display.
cacheServerOutKb: Number of kilobytes of data that the server has sent to
the outside world (in requests). Equivalent to "server.all.kbytes.out"
value in cachemgr "Traffic and Resource Counters" display.
cacheServerInKb: Number of kilobytes of data that have entered the server
from the outside world (in response to requests). Equivalent to
"server.all.kbytes.in" value in cachemgr "Traffic and Resource Counters"
display.
b) traffic between server and client
cacheHttpHits: Number of client requests the server has satisfied from the
cache. Equivalent to "client_http.hits" in cachemgr "Traffic and Resource
Counters" display.
cacheClientHttpRequests: Number of requests clients have sent to the
server. Equivalent to "client_http.requests" value in cachemgr "Traffic and
Resource Counters" display, and "Connection information for squid: Number of
HTTP requests received" value in cachemgr "General Runtime Statistics"
display.
cacheHttpInKb: Number of kilobytes of data the server has received from
clients (in requests). Equivalent to "client_http.kbytes_in" value in
cachemgr "Traffic and Resource Counters" display.
cacheHttpOutKb: Number of kilobytes of data the server has sent to clients
(responses to requests). Equivalent to "client_http.kbytes_out" value in
cachemgr "Traffic and Resource Counters" display.
cacheClients: Number of different clients that have petitioned the server.
Equivalent to "Connection information for squid: Number of clients accessing
cache" value in cachemgr "General Runtime Statistics" display.
c) hit and byte ratios
cacheRequestHitRatio.x: Request Hit Ratio, expressed as a percent of all
requests that have been served from the cache. The parameter "x" indicates
the time interval to measure, in minutes:
cacheRequestHitRatio.5 shows the same value as "Cache information for squid:
Request Hit Ratios: 5min:" value in cachemgr "General Runtime Statistics"
display.
cacheRequestHitRatio.60 shows the same value as "Cache information for
squid: Request Hit Ratios: 60min:" value in cachemgr "General Runtime
Statistics" display.
The Request Hit Ratio is calculated this way:
100 * (( cacheHttpHits[current] - cacheHttpHits[x minutes ago] ) /
(cacheClientHttpRequests[current] - cacheClientHttpRequests[x minutes
ago] ))
cacheRequestByteRatio.x: Request Byte Ratio, expressed as a percent of all
bytes that have been served from the cache. The parameter "x" indicates the
time interval to measure, in minutes:
cacheRequestByteRatio.5 shows the same value as "Cache information for
squid: Request Byte Ratios: 5min:" value in cachemgr "General Runtime
Statistics" display.
cacheRequestByteRatio.60 shows the same value as "Cache information for
squid: Request Byte Ratios: 60min:" value in cachemgr "General Runtime
Statistics" display.
The Request Byte Ratio is calculated this way:
100 * ( (( cacheHttpOutKb[current] - cacheHttpOutKb[x minutes ago] ) -
(cacheServerInKb[current] - cacheServerInKb[x minutes ago] )) /
(cacheHttpOutKb[current] - cacheHttpOutKb[x minutes ago] )) )
Note that the ratio may be negative, if the server has read in more bytes
from the outside world than clients have requested (see FAQ).
d) median service times
cacheHttpAllSvcTime.x: Median time in seconds it took to serve a request of
any type. The parameter "x" indicates the time interval to average, in
minutes:
cacheHttpAllSvcTime.5 shows the same value as "Median Service Times
(seconds): HTTP Requests (All): 5min:" value in cachemgr "General Runtime
Statistics" display.
cacheHttpAllSvcTime.60 shows the same value as "Median Service Times
(seconds): HTTP Requests (All): 60min:" value in cachemgr "General Runtime
Statistics" display.
cacheHttpMissSvcTime.x: Median time in seconds it took to serve a request
that had to be retrieved from the internet. The parameter "x" indicates the
time interval to average, in minutes:
cacheHttpMissSvcTime.5 shows the same value as "Median Service Times
(seconds): Cache Misses: 5min:" value in cachemgr "General Runtime
Statistics" display.
cacheHttpMissSvcTime.60 shows the same value as "Median Service Times
(seconds): Cache Misses: 60min:" value in cachemgr "General Runtime
Statistics" display.
cacheHttpHitSvcTime.x: Median time in seconds it took to serve a request
that was retrieved from the cache. The parameter "x" indicates the time
interval to average, in minutes:
cacheHttpHitSvcTime.5 shows the same value as "Median Service Times
(seconds): Cache Hits: 5min:" value in cachemgr "General Runtime
Statistics" display.
cacheHttpHitSvcTime.60 shows the same value as "Median Service Times
(seconds): Cache Hits: 60min:" value in cachemgr "General Runtime
Statistics" display.
Received on Fri Jun 08 2001 - 01:33:48 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:22:13 MST