歡迎您光臨本站 註冊首頁

ats 日誌記錄問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

ats 日誌記錄問題

aaa大大,有個問題麻煩解答一下

我前端有幾個域名訪問,都是指定的同一個回源

比如:
regex_map http://(.*).abc.com http://cdn.test.com

前面有s1.abc.com s2.abc.com

但在日誌裡面查看都是回源的域名,如何可以記錄訪問的域名

1355382520.273 60 x.x.x.x TCP_MISS/200 388 GET http://cdn.test.com/robots.txt - DIRECT/cdn.4399yyy.com text/html -
《解決方案》

試試這個,ATS的日誌折騰了我半天才搞好:

<LogFormat>
  <Name = "squid_log"/>
  <Format = "[%<cqtn>] %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquuc> %<caun> %<phr> %<psct> %<xid>"/>
</LogFormat>
<LogObject>
    <Format = "squid_log"/>
    <Filename = "squid.log"/>
</LogObject>
《解決方案》

瀏覽器刷新頁面,CACHE核對文檔緩存期並返回304消息:

0 192.168.1.5 TCP_IMS_HIT/304 137 GET http://www.aidns.cn/images/mail.gif - NONE - -
0 192.168.1.5 TCP_IMS_HIT/304 137 GET http://www.aidns.cn/images/index_01.gif - NONE - -
0 192.168.1.5 TCP_IMS_HIT/304 137 GET http://www.aidns.cn/images/nav_bg.gif - NONE - -
0 192.168.1.5 TCP_IMS_HIT/304 137 GET http://www.aidns.cn/images/index_50.gif - NONE - -

CACHE核對文檔緩存期發現已經過期並向源伺服器取,最後返回用戶:

138 192.168.1.5 TCP_MISS/200 16887 GET http://www.aidns.cn/anli.htm - DIRECT text/html -
93 192.168.1.5 TCP_MISS/200 3312 GET http://www.aidns.cn/images/anli/funshion.gif - DIRECT image/gif -
99 192.168.1.5 TCP_MISS/200 2621 GET http://www.aidns.cn/images/anli/xikee.gif - DIRECT image/gif -
103 192.168.1.5 TCP_MISS/200 4179 GET http://www.aidns.cn/images/anli/ap365.gif - DIRECT image/gif -
102 192.168.1.5 TCP_MISS/200 2055 GET http://www.aidns.cn/images/anli/kedacom.gif - DIRECT image/gif -
102 192.168.1.5 TCP_MISS/200 5674 GET http://www.aidns.cn/images/anli/ytpu.gif - DIRECT image/gif -

CACHE命中緩存文件:

0 192.168.1.5 TCP_HIT/200 519 GET http://www.aidns.cn/images/index_09.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 528 GET http://www.aidns.cn/images/index_071.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 518 GET http://www.aidns.cn/images/index_10.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 526 GET http://www.aidns.cn/images/index_11.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 432 GET http://www.aidns.cn/images/index_34.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 7713 GET http://www.aidns.cn/images/index_24.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 4822 GET http://www.aidns.cn/images/index_41.gif - NONE image/gif -
0 192.168.1.5 TCP_HIT/200 523 GET http://www.aidns.cn/images/index_13.gif - NONE image/gif -

[火星人 ] ats 日誌記錄問題已經有764次圍觀

http://coctec.com/docs/service/show-post-11972.html