월간 인기 게시물

게시물 111건
   
SQUID 로그정보
글쓴이 : 최고관리자 날짜 : 2010-04-06 (화) 10:09 조회 : 20061
글주소 :
                             

SQUID 로그파일 정보

cache.log : squid에 대한 동작 Flow에 대한 로그 파일

2010/04/05 19:14:17| Config 'request_header_max_size'= 5120 bytes.
2010/04/05 19:14:19| Request header is too large (5840 bytes)
2010/04/05 19:14:19| Config 'request_header_max_size'= 5120 bytes.
2010/04/05 19:43:52| WARNING: Forwarding loop detected for:
Client: 211.119.250.40 http_port: xx.xxx.xxx.40:80
GET http://xxx.xxx.xxx.40/ HTTP/1.0
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Accept-Encoding: gzip, deflate
Host: xxx.xxx.xxx.40
Via: 1.1 xxx.xxx.com:80 (squid)
X-Forwarded-For: xxx.xxx.xxx.66
Cache-Control: max-age=259200
Connection: keep-alive

2010/04/05 19:43:52| WARNING: Forwarding loop detected for:
Client: xxx.xxx.xxx.40 http_port: xxx.xxx.xxx.40:80
GET http://xxx.xxx.xxx.40/ HTTP/1.0
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Accept-Encoding: gzip, deflate
Host: xxx.xxx.xxx.40
Via: 1.1 xxx.xxx.com:80 (squid), 1.0 xxx.xxx.com:80 (squid)
X-Forwarded-For: xxx.xxx.xxx.66, xxx.xxx.xxx.40
Cache-Control: max-age=259200
Connection: keep-alive

2010/04/05 20:18:33| clientReadRequest: FD 89 (59.xxx.xxx.122:3732) Invalid Request
2010/04/05 20:18:33| clientReadRequest: FD 94 (59.xxx.xxx.122:3737) Invalid Request
2010/04/05 20:18:33| clientReadRequest: FD 96 (59.xxx.xxx.122:3961) Invalid Request

※ cache에 대한 debug log을 확인할 수 있다.
위의 Option을 설정하여 cache 기능을 시험하면 squid의 전체 Flow에 대한 debug 메시지를 확인할 수 있다. 이 메시지를 사용하여 사용자는 debugging 작업을 수행할 수 있다



access.log : GET, PUT method에 대한 access 결과가 출력

1270530049.102      2 59.xxx.xxx.171 TCP_MISS/200 509 GET http://www.xxx.xxx/skin/default/xxx_img/bottom_top.gif - DIRECT/218.xxx.xxx.75 image/gif
1270530049.102      2 59.xxx.xxx.171 TCP_MISS/200 5222 GET http://www.xxx.xxx/skin/default/xxx/cot.js - DIRECT/218.xxx.xxx.75 application/x-javascript
1270530049.104      3 59.xxx.xxx.171 TCP_MISS/200 13887 GET http://www.xxx.xxx/skin/default/xxx_img/bottom.gif - DIRECT/218.xxx.xxx.75 image/gif
1270530049.169    146 59.xxx.xxx.171 TCP_HIT/200 387129 GET http://www.xxx.xxx/skin/default/xxx/flash/shopping_bt.swf - NONE/- application/x-shockwave-flash
1270530049.211     42 59.xxx.xxx.171 TCP_MISS/200 20659 GET http://www.xxx.xxx/skin/default/xxx/cornertrust.gif - DIRECT/218.xxx.xxx.75 image/gif

※ 이 log File로 GET기능 수행시 Cache된 Data가 정상적으로GET되었는지를 확인할 수 있다.
위의 메시지 중 TCP_HIT는 Cache된 URL을 GET, TCP_MISS는 외부에서 URL을 GET하였음을 표시함. 위의 메시지를 확인하여 정상적으로 GET되었는지를 알 수 있다.
즉 TCP_HIT가 출력되면 정상적으로 데이터가 GET된 것이다. 만약 TCP_MISS가 출력되면 캐시된 데이터가 없는 것이다.


store.log : 캐시 Data를 Swap File에 Write하는지에 대한 정보 출력

1270530382.338 RELEASE -1 FFFFFFFF BD5ECFF9774ACD7FD3A962DE8122E94F  200 1270516697 1187020999 1585876697 image/gif 74/74 GET http://www.xxx.xxx/skin/default/main_img/bottom_line.gif
1270530382.339 RELEASE -1 FFFFFFFF E72A4DC9B6AEB52332DB71357AB1F06E  200 1270516697 1187020997 1585876697 image/gif 253/253 GET http://www.xxx.xxx/skin/default/main_img/bottom_01.gif
1270530382.339 RELEASE -1 FFFFFFFF F7BD7B9833828825B7C1FF39F2DC3B1B  200 1270516697 1187020998 1585876697 image/gif 274/274 GET http://www.xxx.xxx/skin/default/main_img/bottom_02.gif
1270530382.340 RELEASE -1 FFFFFFFF F94C7769A23531A747006C190D64DEA8  200 1270516697 1187020998 1585876697 image/gif 271/271 GET http://www.xxx.xxx/skin/default/main_img/bottom_04.gif
1270530382.340 RELEASE -1 FFFFFFFF 482001A3F340F6AB92DCA2C67C2D4D4E  200 1270516697 1187020998 1585876697 image/gif 504/504 GET http://www.xxx.xxx/skin/default/main_img/bottom_05.gif
1270530382.341 RELEASE -1 FFFFFFFF 4D600ECB599D84466EC708EEC2126169  200 1270516697 1187020999 1585876697 image/gif 138/138 GET http://www.xxx.xxx/skin/default/main_img/bottom_top.gif
1270530382.341 RELEASE -1 FFFFFFFF BE59C755D0F1C34F3282B16B25D2A416  200 1270516697 1192757856 1585876697 image/gif 432/432 GET http://www.xxx.xxx/skin/default/main_img/bottom_03.gif
1270530382.342 RELEASE -1 FFFFFFFF A3709B8709FF81AF217CF536C23AF6A8  200 1270516697 1253358658 1585876697 application/x-javascript 4835/4835 GET http://www.xxx.xxx/skin/default/script/cot.js

※ 위에 RELEASE는 FILE이 RELEASE되었다는 것, SWAPOUT은 File이 생성되었다는 것을 나타낸다. SWAPIN은 File에 접근하였다는 것을 나타낸다.
SWAPOUT인 경우 Fileno가 00000015이면 /usr/local/squid/cache/00/00에 Fileno 00000015 file이 생성되었다는 의미이다. 직접 /usr/local/squid/cache/00/00에 들어가 정상적으로 해당 File이 생성되었는지를 확인한다.
만약 Fileno가 00020017이면 /usr/local/squid/cache/00/02에 Fileno 00000017 file이 생성되었다는 의미이다.

squid.pid : 동작하는 squid의 pid가 출력

cache directory : Swap file에 대한 정보




캐쉬기능

PUT : URL과 해당 Data을 저장
Cache 서버가 Proxy로부터 URL과 URL의 Content를 수신하였을때 해당 URL과 URL의 Content를 저장하는 기능이다. Cache Server가 Proxy Server로부터 URL과 해당 URL의Content를 수신하면 먼저 해당 URL의 Header 부분을 검사한다. Header 부분을 검사하여 캐시 가능한 Content일 경우 해당 URL을 Disk에 저장한다. 이때 컨텐츠 크기가 2048 이하일때는 Ram Disk에 저장되고 2048 이상일때는 URL에 해당되는 Content는 물리적인 Disk인 /usr/local/squid/cache의 디렉토리에 저장된다. 만약 캐시가능한 데이터인데도 저장 공간이 부족할 시에는 LRU(Least Recnet Unit) 정책을 따라 가장 오래 저장된 캐시데이터가 삭제된다. 만약 데이터가 삭제되었는데도 남은 공간이 컨텐츠 크기보다 작으면 그 데이터는 저장되지 않는다.

GET : URL에 대한 데이터 요구시 해당데이터를 검색하여 전송
GET 기능은 cache에 저장된 URL의 Content를 Proxy Server로 가져오기 위한 기능이다. Proxy Server에서 URL의 정보를 가져오기 위해 다음과 같이 입력하여야 한다.
GET URL HTTP/1.0
위와 같이 입력시 Cache Server에 해당 URL이 없으면 NOK, 해당 URL이 있으면 Cache Server에서는 해당 URL이 저장된 File 위치를 검색한 후 해당 File에 저장되어 있는 Content를 Proxy Server로 전송한다.
만약 해당 URL과 URL에 해당하는 Content가 있어도 유효기간이 지난 데이터를 요구하면 해당 URL과 URL에 해당되는 Content를 삭제하고 Proxy Server로 NOK 메시지를 전송한다.


이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.