日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

squid 日志详解

發布時間:2024/9/21 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 squid 日志详解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在squid設置有日志格式設置logformat?squid?%ts.%03tu?%6tr?%>a?%Ss/%03Hs?%<st?%rm?%ru?%un?%Sh/%<A?%mt參數解釋如下Field?name?syntax?keys:{}?modifier?or?argument.?Also?used?to?specify?header?names>??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??userl??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

總結

以上是生活随笔為你收集整理的squid 日志详解的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。