Squidclient is a tool that can access the squid service, and retrieve statistics on the service. For example, to get some general performance statistic, run the following command on the squid server
squidclient -p 3128 mgr:
HTTP/1.0 200 OK
Server: squid/2.6.STABLE14
Date: Sun, 25 Mar 2018 15:31:13 GMT
Content-Type: text/plain
Expires: Sun, 25 Mar 2018 15:31:13 GMT
Last-Modified: Sun, 25 Mar 2018 15:31:13 GMT
X-Cache: MISS from 172.19.134.2
X-Cache-Lookup: MISS from 172.19.134.2:3128
Via: 1.0 172.19.134.2:3128 (squid/2.6.STABLE14)
Proxy-Connection: close
mem Memory Utilization public
cbdata Callback Data Registry Contents public
events Event Queue public
squidaio_counts Async IO Function Counters public
config Current Squid Configuration hidden
ipcache IP Cache Stats and Contents public
fqdncache FQDN Cache Stats and Contents public
idns Internal DNS Statistics public
external_acl External ACL stats public
http_headers HTTP Header Statistics public
menu This Cachemanager Menu public
shutdown Shut Down the Squid Process hidden
offline_toggle Toggle offline_mode setting hidden
info General Runtime Information public
filedescriptors Process Filedescriptor Allocation public
objects All Cache Objects public
vm_objects In-Memory and In-Transit Objects public
openfd_objects Objects with Swapout files open public
pending_objects Objects being retreived from the network public
client_objects Objects being sent to clients public
io Server-side network read() size histograms public
counters Traffic and Resource Counters public
peer_select Peer Selection Algorithms public
digest_stats Cache Digest and ICP blob public
5min 5 Minute Average of Counters public
60min 60 Minute Average of Counters public
utilization Cache Utilization public
histograms Full Histogram Counts public
active_requests Client-side Active Requests public
store_digest Store Digest public
storedir Store Directory Stats public
store_check_cachable_stats storeCheckCachable() Stats public
store_io Store IO Interface Stats public
pconn Persistent Connection Utilization Histograms public
refresh Refresh Algorithm Statistics public
forward Request Forwarding Statistics public
client_list Cache Client List public
asndb AS Number Database public
server_list Peer Cache Statistics public
non_peers List of Unknown sites sending ICP messages public
squidclient -p 3128 mgr:
HTTP/1.0 200 OK
Server: squid/2.6.STABLE14
Date: Sun, 25 Mar 2018 15:31:13 GMT
Content-Type: text/plain
Expires: Sun, 25 Mar 2018 15:31:13 GMT
Last-Modified: Sun, 25 Mar 2018 15:31:13 GMT
X-Cache: MISS from 172.19.134.2
X-Cache-Lookup: MISS from 172.19.134.2:3128
Via: 1.0 172.19.134.2:3128 (squid/2.6.STABLE14)
Proxy-Connection: close
mem Memory Utilization public
cbdata Callback Data Registry Contents public
events Event Queue public
squidaio_counts Async IO Function Counters public
config Current Squid Configuration hidden
ipcache IP Cache Stats and Contents public
fqdncache FQDN Cache Stats and Contents public
idns Internal DNS Statistics public
external_acl External ACL stats public
http_headers HTTP Header Statistics public
menu This Cachemanager Menu public
shutdown Shut Down the Squid Process hidden
offline_toggle Toggle offline_mode setting hidden
info General Runtime Information public
filedescriptors Process Filedescriptor Allocation public
objects All Cache Objects public
vm_objects In-Memory and In-Transit Objects public
openfd_objects Objects with Swapout files open public
pending_objects Objects being retreived from the network public
client_objects Objects being sent to clients public
io Server-side network read() size histograms public
counters Traffic and Resource Counters public
peer_select Peer Selection Algorithms public
digest_stats Cache Digest and ICP blob public
5min 5 Minute Average of Counters public
60min 60 Minute Average of Counters public
utilization Cache Utilization public
histograms Full Histogram Counts public
active_requests Client-side Active Requests public
store_digest Store Digest public
storedir Store Directory Stats public
store_check_cachable_stats storeCheckCachable() Stats public
store_io Store IO Interface Stats public
pconn Persistent Connection Utilization Histograms public
refresh Refresh Algorithm Statistics public
forward Request Forwarding Statistics public
client_list Cache Client List public
asndb AS Number Database public
server_list Peer Cache Statistics public
non_peers List of Unknown sites sending ICP messages public
squidclient -h localhost cache_object://localhost/ mgr:info <Headers missed> Squid Object Cache: Version 2.7.STABLE9 Start Time: Thu, 12 Jul 2012 08:04:02 GMT Current Time: Thu, 12 Jul 2012 09:21:16 GMT Connection information for squid: Number of clients accessing cache: 2 Number of HTTP requests received: 31 Number of ICP messages received: 0 Number of ICP messages sent: 0 Number of queued ICP replies: 0 Number of HTCP messages received: 0 Number of HTCP messages sent: 0 Request failure ratio: 0.00 Average HTTP requests per minute since start: 0.4 Average ICP messages per minute since start: 0.0 Select loop called: 11729 times, 395.079 ms avg Cache information for squid: Request Hit Ratios: 5min: 0.0%, 60min: 0.0% Byte Hit Ratios: 5min: 0.2%, 60min: 0.4% Request Memory Hit Ratios: 5min: 0.0%, 60min: 0.0% Request Disk Hit Ratios: 5min: 0.0%, 60min: 0.0% Storage Swap size: 90344 KB Storage Mem size: 124 KB Mean Object Size: 55.80 KB Requests given to unlinkd: 0 Median Service Times (seconds) 5 min 60 min: HTTP Requests (All): 0.01556 0.01556 Cache Misses: 0.01556 0.01556 Cache Hits: 0.00000 0.00000 Near Hits: 0.00000 0.00000 Not-Modified Replies: 0.00000 0.00000 DNS Lookups: 0.00000 0.06364 ICP Queries: 0.00000 0.00000 Resource usage for squid: UP Time: 4633.878 seconds CPU Time: 2.532 seconds CPU Usage: 0.05% CPU Usage, 5 minute avg: 0.07% CPU Usage, 60 minute avg: 0.05% Process Data Segment Size via sbrk(): 2484 KB Maximum Resident Size: 21216 KB Page faults with physical i/o: 0 Memory usage for squid via mallinfo(): Total space in arena: 2484 KB Ordinary blocks: 2360 KB 3 blks Small blocks: 0 KB 0 blks Holding blocks: 280 KB 1 blks Free Small blocks: 0 KB ….......................................
No comments:
Post a Comment