博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
squid 日志详解
阅读量:6986 次
发布时间:2019-06-27

本文共 2613 字,大约阅读时间需要 8 分钟。

 在squid设置有日志格式设置 logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %
  request (client)  客户请求      <  reply (server)    服务端回应      a  address           访问用户ip地址      A  address name  访问用户电脑名称      h  all headers       浏览器头信息      i  ident                      p  port                 端口      r  request line (no query)      t  time   访问时间      u  user      l  local address/port (where request was accepted)
  • %>a

  • Client source IP address

  • %>A

  • Client FQDN

  • %>p

  • Client source port

  • %<a

  • Server or peer IP address

  • %<p

  • Server or peer port number

  • %<A

  • Server IP address or peer name

  • %la

  • Local IP address where the request was accepted

  • %lp

  • Local port where the request was accepted

  • %lA

  • Local port name where the request was accepted

  • %ts

  • Date of request, seconds since epoch

  • %{format}tl

  • Date of request, strftime format (localtime)

  • %{format}tg

  • Date of request, strftime format (gmt)

  • %tu

  • Date of request, sub-second component

  • %tr

  • Time to serve the request, in milliseconds

  • %{header}>h

  • Request header

  • %{header:element}>h

  • Named request header field element (list headers)

  • %{header:separator element}>h

  • Named request header field element, using "separator" as field separator (it can be any non-alphanumeric single character)

  • %>h

  • All request header

  • %{header}<h

  • Request headers, as for <..h above

  • %un

  • Authenticated user name or dash

  • %ur

  • Authenticated user realm or dash

  • %us

  • Authenticated user scheme or dash

  • %ui

  • Ident user name

  • %Hs

  • HTTP status code (200, 404, 407, etc)

  • %Ht

  • HTTP status text (Not found, etc)

  • %Ss

  • Squid status code (TCP_HIT, TCP_MISS etc)

  • %Se

  • Squid error code (ERR_DENIED, ERR_...)

  • %Sh

  • Squid hierarchy code (FIRST_UP_PARENT, etc)

  • %mt

  • MIME type of the request

  • %rm

  • Request method

  • %ru

  • Request URL, without the query string

  • %rq

  • Request query string, including ?

  • %rp

  • Request protocol (i.e. HTTP/1.1)

  • %ps

  • Peer selection status (DIRECT, PARENT, CD_PARENT_HIT, etc. including the TIMEDOUT_ variant)

  • %>sl

  • Size of request line

  • %>sh

  • Size of request headers, including request line

  • %>sH

  • Size of request headers, excluding request line

  • %>sb

  • Size of request body, raw received bytes

  • %>sB

  • Size of request body, excluding transfer encoding

  • %>st

  • Total size of request

  • %<sl

  • Size of reply status line

  • %<sh

  • Size of reply headers, including status line

  • %<sH

  • Size of reply headers, excluding status line

  • %<sb

  • Size of reply body, raw transmitted bytes

  • %<sB

  • Size of reply body, excluding transfer encoding

  • %<st

  • Total size of reply

  • %%

  • A literal %

  • 不记图片类访问日志设置

    acl nolog urlpath_regex \\.gif \\.jpg \\.css \\.js \\.swf
    access_log /data/squid/var/logs/access.log common !nolog

本文转自神ge 51CTO博客,原文链接:http://blog.51cto.com/12218412/1868943

转载地址:http://kqqpl.baihongyu.com/

你可能感兴趣的文章
20个真棒的jquery和css打造的图片动画效果(网站背景随时变换,广告牌效果..)...
查看>>
[AX]AX2012开发新特性-TempDB临时表
查看>>
django的用户认证管理,如何使用session(1)
查看>>
DataTableHelper
查看>>
实例说明optimize table在优化mysql时很重要
查看>>
shell惊鸿
查看>>
三个快速且简单的让你的大脑安静下来的方法
查看>>
UWP入门(十二)--数据绑定用法
查看>>
aspx代码审计-1
查看>>
快速php日志,写内容到文件,把日志写到log文件
查看>>
linux percpu机制解析【转】
查看>>
C#多线程编程
查看>>
Nutch配置:nutch-default.xml详解
查看>>
EF6 在原有数据库中使用 CodeFirst 总复习(一、搭建基础环境)
查看>>
[svc]tomcat配置文件详解-最简单的基于mvn的war包
查看>>
centos--git搭建之Gogs安装
查看>>
Hive:有表A与表B进行inner join,如果A分组内包含有数据,使用A,否则使用B分组下的数据...
查看>>
maven下的jar项目打包的方法
查看>>
为确保固定资产的财务帐与实物帐一致,应采取的措施
查看>>
带你从零学ReactNative开发跨平台App开发-[react native 仿boss直聘](十三)
查看>>