工作中需要了解Squid TCP_MISS/000 的意义,看了一下squid代码:
在代码Enums.h中:先定义了枚举量:
HTTP_STATUS_NONE = 0,
下面这个 sline结构的status,最后会赋值到在log中看到的TCP_MISS后面000这个http->code变量
这个 sline变量的status值在初始化的时候被初始化为HTTP_STATUS_NONE, 也就是0:
void
httpStatusLineInit(HttpStatusLine * sline)
{
HttpVersion version;
httpStatusLineSet(sline, version, HTTP_STATUS_NONE, NULL);
}
其它的 在代码中有几处在分析http header之前 设置了:
http_status error = HTTP_STATUS_NONE;
如果系统出错会把error赋值给http->code所在的数据结构
总结起来就是在拿不到header头部进行分析的时候,log文件中的http->code这个标记为0
对比了一下log, TCP_MISS 后面的http->code有200,304,000三种,000这种后面的cache条目的大小标志位也为0
squid log的格式为:
logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %"PRId64" %s %s %s %s%s/%s %s/n",
(long int) current_time.tv_sec,
(int) current_time.tv_usec / 1000,
al->cache.msec,
client,
log_tags[al->cache.code],
al->http.code,
al->cache.size,
al->_private.method_str,
al->url,
user ? user : dash_str,
al->hier.ping.timedout ? "TIMEOUT_" : "",
hier_strings[al->hier.code],
al->hier.host,
al->http.content_type);
看了一下网上资料,如下:
http://www.mail-archive.com/squid-users@squid-cache.org/msg33707.html
TCP_MISS/000 means there was no response. Usually client aborted.
NONE/- indicates Squid could not find where to send the request. I.e. probably DNS related problems.
Details about TCP_MISS/000 in access.log
Squid: Details about TCP_MISS/000 in access.log
I noticed some TCP_MISS/000 entries in squid access_log this afternoon, as what I saw 3 years ago.
As we know that TCP_MISS means the URL has no stored objects in cache, and TCP_MISS/000 is the bit usually means aborted, indicating there's no reply to the request before the client aborted the connection. It might be caused by the following reasons:
1, The client aborted request before SQUID could return any data
2, The website might be unavailable, due to DNS issue, network issue or an abnormal running web server.
For DNS issues, we need to check whether the dns server that used by SQUID is working as expected or not.
For network issues, we might need to check network connection status, packet lost, transfer latency or something else.
To check a web server, you can send some command to its service port, usually, you can follow this command:
$ telnet Your.Server.tld 80 [return]
GET / HTTP/1.0 [return][return]
If there is no output, you might need to restart the web server. [over]
I noticed some TCP_MISS/000 entries in squid access_log this afternoon, as what I saw 3 years ago.
As we know that TCP_MISS means the URL has no stored objects in cache, and TCP_MISS/000 is the bit usually means aborted, indicating there's no reply to the request before the client aborted the connection. It might be caused by the following reasons:
1, The client aborted request before SQUID could return any data
2, The website might be unavailable, due to DNS issue, network issue or an abnormal running web server.
For DNS issues, we need to check whether the dns server that used by SQUID is working as expected or not.
For network issues, we might need to check network connection status, packet lost, transfer latency or something else.
To check a web server, you can send some command to its service port, usually, you can follow this command:
分享到:
相关推荐
NULL 博文链接:https://k19421.iteye.com/blog/2308526
squid使用源码安装的时候经常启动的时候出现的错误
squid日志格式-http错误代码-注解
基于Alpine Linux+S6的Squid___内容缓存.zip
鱿鱼代理安装程序 在以下Linux操作系统上自动安装Squid 3代理。 Ubuntu 14.04、16.04、18.04、20.04 Debian 8、9、10 CentOS 7、8 安装乌贼 要安装,请运行脚本 ...sudo /usr/bin/htpasswd /etc/squid/
设置Squid Cache_mem大小.docx
如何设置Squid Cache_mem大小.docx
该笔记由博主本人亲自整理撰写,介绍以及各方面的操作都进行了简化提示,很适合linux的萌新进行学习,基础的配置时候入门新手了解squid与haproxy两个服务
被广泛使用的代理服务器
SARG的全称是:Squid Analysis Report Generator SARG作为一款Squid日志分析工具,它采用html格式,详细列出了每一位用户访问internet的站点信息,时间占用信息,排名,连接次数,访问量,访问量等
squid_配置详解
python squidmagic.py /squid/access.log _ _ _ (_) | | (_) ___ __ _ _ _ _ __| |_ __ ___ __ _ __ _ _ ___ / __|/ _` | | | | |/ _` | '_ ` _ \ / _` |/ _` | |/ __| \__ \ (_| | |_| | | (_|
问题描述:在Linux系统中高并发的Squid服务器,TCP TIME_WAIT套接字数量经常达到两、三万,服务器很容易被拖死。解决方法:通过修改Linux内核参数,可以减少linux服务器的IME_WAIT套接字数量。vi /etc/sysctl.conf...
用于squid mysql 验证的软件 这样squid的帐户就可以放到mysql了
#本机上的Squid开启3128端口 server 192.168.8.1:3128 weight=5; server 192.168.8.2:80 weight=1; server 192.168.8.3:80 weight=6; } server { #侦听80端口 listen 80; #定义使用www.xx.com访问 ...
网络故障判断强大的工具,SNIFFER,希望对大家有用。
squid在windows下的版本,内附使用说明,squid是liunx下高性能的代理软件。
NULL 博文链接:https://lindows.iteye.com/blog/247703