squid 请求/响应分析

squid 请求/响应分析

如何获取有关 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。

答案2

有很多选项,但不完全像 Apache 服务器状态。

鱿鱼视图

Squid日志文件分析

相关内容