The full name of SARG is: Squid Analysis Report GeneratorSARG is a Squid log analysis tool. It uses html format to detail the site information, time occupation information, ranking, connection times, and traffic of each user accessing the internet. , visits, etc.
Install SARG (take sarg-2.3.1. as an example)
wget http://prdownloads.sourceforge.net/sarg/sarg-2.3.1.tar.gztar -zxvf sarg -2.3.1.tar.gzcd sarg-2.3.1
./configuremakemake install
Create SARG Report Directory
mkdir /var/www/html/sarg ## My web root directory is /var/www/html
Set SARG
vi /usr/local/sarg/sarg.conf ##sargInstallation directory
access_log /var/log/squid/access.logoutput_dir /var/www/html/sargresolve_ip yesoverwrite_report yes
Setting up hourly update report data
vi /etc/cron.hourly/sarg
#!/bin/sh
/usr/bin/sarg > /dev/null 2>&1
chmod a+x /etc/cron.hourly/Sarg
Select other related settings
Edit /etc/hosts IP hostname comparison table, for example:
192.168.18.10 Mary192.168.18.11 Jack192.168.18. 12 David...
Set daily 23:59 Clear Proxy Cache
vi /etc/squid/squid.freshcache
#!/bin/sh
/usr/bin/sargsleep 5ssyncservice squid stopsleep 5strue > /var/log/squid/access.logtrue > /var/lo /var/log/squid/store.logtrue > /var/log/squid/squid.outsleep 5ssyncrm -rf /var/spool/squid/*sleep 5ssyncservice squid start
chmod a+x /etc/squid/squid.freshcache
vi /etc/crontab
59 23 * * * root /etc/squid/squid.freshcache
According to foreign media reports, many users, like the author, have been intere
1.LinuxOSVersion:RedHat AS 52. Network Environment Settings: Host (Linux): IP: 192.168.1.1 NetMark:
ReiserFS file system is a very good file system, especially for large files or a large number of sma
We use this program and output to analyze the usage and characteristics of waitpid. We set waitpid t
Linux screenshot command import use introduction
U disk linux installation skills
Linux nginx supports .htaccess file to implement pseudo-static method!
CentOS6 how to set up ADSL Internet
Linux kernel source code structure overview
Linux shell string operation (length, find, replace) detailed
Naming files with variables in Linux
Linux command: Change access to files or directories
Win7 system parental control can not open can not control the child online time
The specific usage of the tee command in Linux system
How does win7 prohibit Adobe Flash Player from automatically updating?
How to remove the background color under the desktop icon?
Win10 9901 taskbar search box default text setting tutorial
How does Windows 8 set up the Metro media storage location?
Basic tutorial on flexible use of RPM tools under Linux
How does WPS add its own copyright statement?
Talking about how the win7 system sets the hard disk to be inaccessible through the policy group.