alias

How to read date time in Squid accsess.log?

Logo Squid adalah milik squid-cache.org Bagaimana ya caranya mengubah format access log Squid kedalam format yang lebih manusiawi? Sering kali kita pengen mengakses langsungĀ  access.log Squid dari console. Tapi, dengan mengakses langsung ke file access.log dari console salah satu kendala utamanya adalah time format Unix yang digunakan oleh Squid.

Kira-kira begini lah contohnya:

[root@squid etc]# tail /var/log/squid/access.log
1243577090.172    151 10.11.12.13 TCP_IMS_HIT/304 367 GET http://openx.detik.com/images/607x75_5.swf - NONE/- application/x-shockwave-flash
1243577090.172    359 10.11.12.13 TCP_MISS/200 603 GET http://openx.detik.com/delivery/lg.php? - DIRECT/203.190.241.40 image/gif
1243577090.394    373 10.11.12.13 TCP_MISS/403 314 HEAD http://kompas.realviewusa.com/djvu/Kompas/Kompas/26-Jan-1374/webimages/page0000001_large.jpg - DIRECT/210.87.32.80 text/html
1243577090.802    317 10.11.12.13 TCP_MISS/403 314 HEAD http://kompas.realviewusa.com/djvu/Kompas/Kompas/25-Jan-1374/webimages/page0000001_large.jpg - DIRECT/210.87.32.80 text/html
1243577091.021   2491 10.11.12.13 TCP_MISS/200 6622 GET http://platform.ak.facebook.com/www.new/app_full_proxy.php? - DIRECT/219.83.126.9 image/jpeg
1243577091.021   3429 10.11.12.13 TCP_MISS/200 5012 GET http://photos-a.ak.fbcdn.net/hphotos-ak-snc1/hs030.snc1/4295_86506658804_615283804_1787304_5512203_s.jpg - DIRECT/92.122.127.73 image/jpeg
1243577091.021   3335 10.11.12.13 TCP_MISS/200 5294 GET http://photos-e.ak.fbcdn.net/hphotos-ak-snc1/hs030.snc1/4295_86506693804_615283804_1787308_1939240_s.jpg - DIRECT/92.122.127.73 image/jpeg
1243577091.021   1658 10.11.12.13 TCP_MISS/200 3165 GET http://profile.ak.facebook.com/v228/1596/105/q1441083467_3141.jpg - DIRECT/219.83.126.10 image/jpeg
1243577091.021   1208 10.11.12.13 TCP_MISS/200 2302 GET http://profile.ak.facebook.com/v226/372/6/q1432774955_8436.jpg - DIRECT/219.83.126.8 image/jpeg
1243577091.201    319 10.11.12.13 TCP_MISS/403 314 HEAD http://kompas.realviewusa.com/djvu/Kompas/Kompas/24-Jan-1374/webimages/page0000001_large.jpg - DIRECT/210.87.32.80 text/html
[root@squid etc]#

Read More »How to read date time in Squid accsess.log?