How to monitor the trafic through squid server

Discussion regarding the installation and configuration of Linux distributions.
Post Reply
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

How to monitor the trafic through squid server

Post by smk08 »

Asslamu Alaikum


Dear brothers please tell me how to monitor the traffic through squid server.

Thanks & Regards.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re: How to monitor the trafic through squid server

Post by LinuxFreaK »

Dear smk08,
Salam,
smk08 wrote:Dear brothers please tell me how to monitor the traffic through squid server.
FYI, http://squid.acmeconsulting.it/mrtg.html

Best Regards.
Farrukh Ahmed
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

For a realtime monitoring you use following command.

Code: Select all

tail -f /path/to/your/access.log
and for a graphical view of your logs you can use Sarg or Squint.

squidview is also a good tool for monitoring realtime logs.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
imzee
Lance Naik
Posts: 17
Joined: Fri Sep 14, 2007 2:30 pm
Location: Saddar

Post by imzee »

wsalam,

for realtime monitoring you can use ommand

1)
tail -f /your/squid/logs/access.log
for selected IP
tail -f /your/squid/logs/access.log | grep IP-ADDRESS
but it is only for http monitoring. With use of tail only can monitor downloaded links.

2)
for realtime network monitor, use iptraf

3)
use sarg for for make graphicaly reports with detailed information.

4)
edit your crontab and add
@daily sarg
@daily /your/squid/deamon/squid -k rotate

this will generate daily basis report at 12:00AM to:
http://yourserver/squid-reports
Imtiaz Mustafa
CCENT, CCNA, JNCIA
Cell : +923452828799
e-mail : imtiazmustafa@hotmail.com
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

Dear Imtiaz

Why u opening old closed threads
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
imzee
Lance Naik
Posts: 17
Joined: Fri Sep 14, 2007 2:30 pm
Location: Saddar

Post by imzee »

May be, it can help other peoples..
sorry 4 that, I ignored posted dated before posting reply
Imtiaz Mustafa
CCENT, CCNA, JNCIA
Cell : +923452828799
e-mail : imtiazmustafa@hotmail.com
Post Reply