squid日志
时间:2009-03-23 来源:sjhf
相应于HTTP请求,下列标签可能出现在access.log文件的第四个域。
TCP_HIT Squid发现请求资源的貌似新鲜的拷贝,并将其立即发送到客户端。 TCP_MISS Squid没有请求资源的cache拷贝。 TCP_REFERSH_HIT Squid发现请求资源的貌似陈旧的拷贝,并发送确认请求到原始服务器。原始服务器返回304(未修改)响应,指示squid的拷贝仍旧是新鲜的。 TCP_REF_FAIL_HIT Squid发现请求资源的貌似陈旧的拷贝,并发送确认请求到原始服务器。然而,原始服务器响应失败,或者返回的响应Squid不能理解。在此情形下,squid发送现有cache拷贝(很可能是陈旧的)到客户端。 TCP_REFRESH_MISS Squid发现请求资源的貌似陈旧的拷贝,并发送确认请求到原始服务器。原始服务器响应新的内容,指示这个cache拷贝确实是陈旧的。 TCP_CLIENT_REFRESH_MISS Squid发现了请求资源的拷贝,但客户端的请求包含了Cache-Control: no-cache指令。Squid转发客户端的请求到原始服务器,强迫cache确认。 TCP_IMS_HIT 客户端发送确认请求,Squid发现更近来的、貌似新鲜的请求资源的拷贝。Squid发送更新的内容到客户端,而不联系原始服务器。 TCP_SWAPFAIL_MISS Squid发现请求资源的有效拷贝,但从磁盘装载它失败。这时squid发送请求到原始服务器,就如同这是个cache丢失一样。 TCP_NEGATIVE_HIT 在对原始服务器的请求导致HTTP错误时,Squid也会cache这个响应。在短时间内对这些资源的重复请求,导致了否命中。negative_ttl指令控制这些错误被cache的时间数量。请注意这些错误只在内存cache,不会写往磁盘。下列HTTP状态码可能导致否定cache(也遵循于其他约束): 204, 305, 400, 403, 404, 405, 414, 500, 501, 502, 503, 504。 TCP_MEM_HIT Squid在内存cache里发现请求资源的有效拷贝,并将其立即发送到客户端。注意这点并非精确的呈现了所有从内存服务的响应。例如,某些cache在内存里,但要求确认的响应,会以TCP_REFRESH_HIT, TCP_REFRESH_MISS等形式记录。 TCP_DENIED 因为http_access或http_reply_access规则,客户端的请求被拒绝了。注意被http_access拒绝的请求在第9域的值是NONE/-,然而被http_reply_access拒绝的请求,在相应地方有一个有效值。 TCP_OFFLINE_HIT 当offline_mode激活时,Squid对任何cache响应返回cache命中,而不用考虑它的新鲜程度。 TCP_REDIRECT 重定向程序告诉Squid产生一个HTTP重定向到新的URI(见11.1节)。正常的,Squid不会记录这些重定向。假如要这样做,必须在编译squid前,手工定义LOG_TCP_REDIRECTS预处理指令。 NONE 无分类的结果用于特定错误,例如无效主机名。 相应于ICP查询,下列标签可能出现在access.log文件的第四域。 UDP_HIT Squid在cache里发现请求资源的貌似新鲜的拷贝。 UDP_MISS Squid没有在cache里发现请求资源的貌似新鲜的拷贝。假如同一目标通过HTTP请求,就可能是个cache丢失。请对比UDP_MISS_NOFETCH。 UDP_MISS_NOFETCH 跟UDP_MISS类似,不同的是这里也指示了Squid不愿去处理相应的HTTP请求。假如使用了-Y命令行选项,Squid在启动并编译其内存索引时,会返回这个标签而不是UDP_MISS。 UDP_DENIED 因为icp_access规则,ICP查询被拒绝。假如超过95%的到某客户端的ICP响应是UDP_DENIED,并且客户端数据库激活了(见附录A),Squid在1小时内,停止发送任何ICP响应到该客户端。若这点发生,你也可在cache.log里见到一个警告。 UDP_INVALID Squid接受到无效查询(例如截断的消息、无效协议版本、URI里的空格等)。Squid发送UDP_INVALID响应到客户端。 TCP_HIT A valid copy of the requested object was in the cache. TCP_MISS The requested object was not in the cache. TCP_REFRESH_HIT The requested object was cached but STALE. The IMS query for the object resulted in "304 not modified". TCP_REF_FAIL_HIT The requested object was cached but STALE. The IMS query failed and the stale object was delivered. TCP_REFRESH_MISS The requested object was cached but STALE. The IMS query returned the new content. TCP_CLIENT_REFRESH_MISS The client issued a "no-cache" pragma, or some analogous cache control command along with the request. Thus, the cache has to refetch the object. TCP_IMS_HIT The client issued an IMS request for an object which was in the cache and fresh. TCP_SWAPFAIL_MISS The object was believed to be in the cache, but could not be accessed. TCP_NEGATIVE_HIT Request for a negatively cached object, e.g. "404 not found", for which the cache believes to know that it is inaccessible. Also refer to the explainations for negative_ttl in your squid.conf file. TCP_MEM_HIT A valid copy of the requested object was in the cache and it was in memory, thus avoiding disk accesses. TCP_DENIED Access was denied for this request. TCP_OFFLINE_HIT The requested object was retrieved from the cache during offline mode. The offline mode never validates any object, see offline_mode in squid.conf file. UDP_HIT A valid copy of the requested object was in the cache. UDP_MISS The requested object is not in this cache. UDP_DENIED Access was denied for this request. UDP_INVALID An invalid request was received. UDP_MISS_NOFETCH During "-Y" startup, or during frequent failures, a cache in hit only mode will return either UDP_HIT or this code. Neighbours will thus only fetch hits. NONE Seen with errors and cachemgr requests. The following codes are no longer available in Squid-2: ERR_* Errors are now contained in the status code. TCP_CLIENT_REFRESH See: TCP_CLIENT_REFRESH_MISS. TCP_SWAPFAIL See: TCP_SWAPFAIL_MISS. TCP_IMS_MISS Deleted, TCP_IMS_HIT used instead. UDP_HIT_OBJ Hit objects are no longer available. UDP_RELOADING See: UDP_MISS_NOFETCH. |
相关阅读 更多 +