![squid 请求/响应分析](https://linux22.com/image/541394/squid%20%E8%AF%B7%E6%B1%82%2F%E5%93%8D%E5%BA%94%E5%88%86%E6%9E%90.png)
如何获取有关 Squid 请求/响应的报告,类似于 Apache 服务器状态?
答案1
您可以使用 squidclient:
squidclient -h localhost -p 3128 mgr:info
HTTP/1.0 200 OK
Server: squid/3.1.6
Mime-Version: 1.0
Date: Wed, 02 Mar 2011 06:51:49 GMT
Content-Type: text/plain
Expires: Wed, 02 Mar 2011 06:51:49 GMT
Last-Modified: Wed, 02 Mar 2011 06:51:49 GMT
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Via: 1.0 localhost (squid/3.1.6)
Proxy-Connection: close
Squid Object Cache: Version 3.1.6
Start Time: Wed, 02 Mar 2011 06:50:08 GMT
Current Time: Wed, 02 Mar 2011 06:51:49 GMT
Connection information for squid:
Number of clients accessing cache: 1
Number of HTTP requests received: 1
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.6
Average ICP messages per minute since start: 0.0
Select loop called: 29980 times, 3.352 ms avg
...
还可以尝试 mgr:refresh、mgr:counters、mgr:utilization、mgr:mem。