Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know how to monitor the users browsing history and bandwidth utilized by individual IP addresses on Squid proxy. How can i get it done.

share|improve this question
up vote 0 down vote accepted

squid maintains a thorough access log, typically in /var/log/squid, aptly named access.log.

There is a utility named sarg, the Squid Analysis Report Generator, that can be used to parse this log, gather useful statistics from it, and generate a friendly and convenient Web-browsable report that you can examine with any Web browser.

In its simplest form, you invoke sarg with the name of the log file you wish to examine, like this:

sarg /var/log/squid/access.log 

For bandwidth utilization::

The basic concept is to set up per-host (class 3) delay pools in squid.conf, then set each of them to the maximum amount of bandwidth I want to allow per user per day. Then, set the "fill" rate to be that maximum amount of bandwidth divided by one day's worth of time, so each delay pool will fill completely in one day.

share|improve this answer
Hi, I had tried the above and worked like a charm...It was in deed helpful.. Still I need little more help that when ever i execute the command for preparing report it reads the whole access log and gives me the report which is being a kind of duplication... Now i would like to know how i can run this command on every shutdown of the server and start a new access log on system start.. – Prem_Kumar_S Mar 13 '13 at 4:34
Can you tell the corresponding method for seeing browsing history on windows? – user984260 Aug 19 '15 at 16:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.