SARG – Squid Analysis Report Generator and Internet Bandwidth Monitoring Tool

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

135 Responses

  1. SuperMario says:

    Hello Ravi,

    I’ve already send you a message on facebook, but you haven’t replied yet…

    Is there a way to implement the SARG-Tool to my own website or edit the

    Thanks in advance!

    • Ravi Saive says:


      Yes, you can implement SARG, but you won’t edit its design, unless you know some coding skills..

      • SuperMario says:

        Thanks for your fast answer!

        Can you give me a guide, what i have to do? I didn’t find something helpfull yet..

        It’s not necessary to change the design, if i can implement it ;)

        • Ravi Saive says:


          You want to implement SARG for Apache website? but why? why not go for GoAccess?

          • SuperMario says:

            @Ravi Saive

            There is the same problem. I’m not able to implement this tool on my website.
            It generates it’s own page…

          • Ravi Saive says:


            Do you have squid running? if yes, just add the location of squid log in Sarg configuration and restart squid to see the reports..

          • SuperMario says:

            I need the report for the admin of a company, that is my problem…

            i make a website to implement such reports and to represent it simple…

  2. Basid Rahman says:

    Hi Ravi

    Thanks for for this great article.

    I was wondering if SARG can be installed on seperate linux box where I have management tools installed, cause I have a old installed and configured squid server running and don’t want to do any installation on that box.


    • Ravi Saive says:


      No not possible, sarg only can be installed on same server where squid is running, or else you can do one thing, you can mount the remote logs directory under different machine and install there sarg to analyze logs..

  3. Abhishek Yadav says:

    Is there any opensource tool for applying acl in squid

  4. chanthy says:

    How to fix sarg record user, I do follow like this but it not record user and record only this computer. Please help me too.

  5. budi says:

    hi there, i wonder if sarg can be used in integration with mikrotik?

    • Ravi Saive says:


      I don’t think sarg will work with mikrotik, never tried it so far and really don’t have any clue about it..sorry..

  6. Rangachisi says:

    Hello there. Thank you for the great tutorial. i am trying to install SARG on Centos 7 and ran to the problem below when trying to run make install

    [[email protected] sarg-2.3.10]# make install
    cd po ; make install
    make[1]: Entering directory `/home/squid/sarg-2.3.10/po’
    *** error: gettext infrastructure mismatch: using a from gettext version 0.18 but the autoconf macros are from gettext version 0.19
    make[1]: *** [check-macro-version] Error 1
    make[1]: Leaving directory `/home/squid/sarg-2.3.10/po’
    make: *** [install-po] Error 2

    i have downloaded and replaced the file in “/usr/share/gettext/po/” with a version 0.19 and also the in “/home/squid/sarg-2.3.10/po” but i still get the same error

    someone please help

    • Ravi Saive says:


      Please visit the following sarg official support forum link, here they’ve discussed about the same sarg compile error, might you will find solution here..

    • Ashutosh says:


      [[email protected] sarg-2.3.10]# make install
      cd po ; make install
      make[1]: Entering directory `/home/squid/sarg-2.3.10/po’
      *** error: gettext infrastructure mismatch: using a from gettext version 0.18 but the autoconf macros are from gettext version 0.19
      make[1]: *** [check-macro-version] Error 1
      make[1]: Leaving directory `/home/squid/sarg-2.3.10/po’
      make: *** [install-po] Error 2

      So that there is this error at compile time :
      Access the po folder SARG :

      [[email protected] sarg-2.3.10]# cd po
      [[email protected] po]# pwd

      Then edit :
      [[email protected] po]# vim

      Look for the line :

      Put like this:

      Return to previous directory to start the compilation :

      [[email protected] po]# cd ..
      [[email protected] sarg-2.3.10]# ./configure
      [[email protected] sarg-2.3.10]# make
      [[email protected] sarg-2.3.10]# make install

      Now Successful Installation Done.
      Now edit your sarg.conf as you want….

      Update gettext verision 0.18 to 0.19
      Check your gettext version- # gettext – -version

  7. JB says:

    Hi Ravi,

    I have just been asked to pull a squid report for a date that has passed, now my challenge at the moment is that I haven’t been able to configure sarg to generate auto report I manually run the sarg -x command….the date in question is on a weekend which i normally dont generate any reports as we dont usually have users in the office.

    Will it be possible to generate such a report?

    • Ravi Saive says:


      If you have logs in place for all previous dates, you can manually run the sarg command to generate report for that date. To be fact, I really don’t know how we can achieve this, but I am sure there is a way, just read the man pages of sarg, you will have some idea..

  8. JB says:

    Hi Ravi,

    Once again thank you so much for getting me up and running with SARG.

    I have been using it for a while now and we accessing reports. Now a new challenge for me as came up, a few of our users have complained that they can not access the internet outside of the office i.e their wfi at home or public wifi. Does this maybe have something to do with the access list in squid? whats the best way to set up the acl so that users can access the internet without having to modify internet settings all the time?


  9. JB says:

    Hi Ravi,

    Thank you so much now my squid proxy is up and running and I can generate reports.

    Just a quick question, in the user reports under access sites,it shows localhost 26143 then its says denied.

    Do you maybe know what does that link to?

    • Ravi Saive says:


      Nothing to worry, it’s just a total bandwidth of request comes to localhost, but got access denied due to security…

  10. Nick says:

    To get sarg to compile without the error: “gettext version 0.18 but the autoconf macros are from gettext version 0.19” I had to edit the configure file, search for 0.19 and change that to 0.18. After that, running make install worked fine.

    • Ravi Saive says:


      Thanks for updating about the gettext version problem, and I am glad that you’ve found a way to fix that, hope it will help others too..

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.