This is an old revision of the document!
[gate:~] # pkg_add -r sarg [gate:~] # cd /usr/local/etc/sarg/ [gate:local/etc/sarg] # cp sarg.conf.default sarg.conf [gate:local/etc/sarg] # cat sarg.conf
... access_log /var/squid/logs/access.log.0 ... output_dir /usr/local/www/apache22/data/sarg ... charset Koi8-r ...
[gate:~] # squid -k rotate [gate:~] # sarg
на постоянно работающем сервере:
[gate:~] # cat /usr/local/etc/periodic/daily/100.sarg.sh
#!/bin/sh echo Generate Squid Access Report /usr/bin/find /usr/local/www/data/sarg/ -maxdepth 1 -mtime +60 -type d -name '*-*' -exec rm -r {} \; /usr/local/sbin/squid -k rotate /usr/local/bin/sarg
[gate:~] # chmod +x /usr/local/etc/periodic/daily/100.sarg.sh
на сервере работающем в течении рабочего дня:
[gate:~] # cat /usr/local/etc/rc.d/sarg.sh
#!/bin/sh echo Generate Squid Access Report /usr/bin/find /usr/local/www/data/sarg/ -maxdepth 1 -mtime +60 -type d -name '*-*' -delete /usr/local/sbin/squid -k rotate /usr/local/bin/sarg
[gate:~] # chmod +x /usr/local/etc/rc.d/sarg.sh
root@gate:~# apt-get install sarg root@gate:~# less /etc/sarg/sarg.conf
... output_dir /var/lib/sarg ...
root@gate:~# less /etc/cron.daily/sarg root@gate:~# less /etc/logrotate.d/squid
root@gate:~# /usr/sbin/sarg-reports manual 01/02/2012