This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
обработка_лог_файлов_сервера_squid [2014/02/07 15:51] val [Ubuntu] |
обработка_лог_файлов_сервера_squid [2017/05/05 06:49] val [Ubuntu] |
||
---|---|---|---|
Line 7: | Line 7: | ||
=== Установка, настройка === | === Установка, настройка === | ||
<code> | <code> | ||
+ | [gate:~] # pkg install sarg | ||
+ | |||
[gate:~] # pkg_add -r sarg | [gate:~] # pkg_add -r sarg | ||
[gate:~] # cd /usr/local/etc/sarg/ | [gate:~] # cd /usr/local/etc/sarg/ | ||
- | |||
- | [gate:local/etc/sarg] # cp sarg.conf.default sarg.conf | ||
[gate:local/etc/sarg] # cat sarg.conf | [gate:local/etc/sarg] # cat sarg.conf | ||
</code><code> | </code><code> | ||
... | ... | ||
- | access_log /var/squid/logs/access.log.0 | + | access_log /var/log/squid/access.log.0 |
... | ... | ||
- | output_dir /usr/local/www/apache22/data/sarg | + | output_dir /usr/local/www/apache24/data/sarg |
... | ... | ||
charset Koi8-r | charset Koi8-r | ||
Line 24: | Line 24: | ||
</code><code> | </code><code> | ||
[gate:~] # squid -k rotate | [gate:~] # squid -k rotate | ||
+ | |||
+ | [gate:~] # setenv LANG ru_RU.KOI8-R | ||
[gate:~] # sarg | [gate:~] # sarg | ||
Line 38: | Line 40: | ||
/usr/bin/find /usr/local/www/data/sarg/ -maxdepth 1 -mtime +60 -type d -name '*-*' -exec rm -r {} \; | /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/sbin/squid -k rotate | ||
+ | export LANG=ru_RU.KOI8-R | ||
/usr/local/bin/sarg | /usr/local/bin/sarg | ||
</code><code> | </code><code> | ||
Line 51: | Line 54: | ||
/usr/bin/find /usr/local/www/data/sarg/ -maxdepth 1 -mtime +60 -type d -name '*-*' -delete | /usr/bin/find /usr/local/www/data/sarg/ -maxdepth 1 -mtime +60 -type d -name '*-*' -delete | ||
/usr/local/sbin/squid -k rotate | /usr/local/sbin/squid -k rotate | ||
+ | export LANG=ru_RU.KOI8-R | ||
/usr/local/bin/sarg | /usr/local/bin/sarg | ||
</code><code> | </code><code> | ||
Line 59: | Line 63: | ||
=== Установка, настройка === | === Установка, настройка === | ||
<code> | <code> | ||
- | root@gate:~# apt-get install sarg | + | root@gate:~# apt install sarg |
root@gate:~# cat /etc/sarg/sarg.conf | root@gate:~# cat /etc/sarg/sarg.conf | ||
</code><code> | </code><code> | ||
... | ... | ||
- | access_log /var/log/squid3/access.log | + | access_log /var/log/squid/access.log |
... | ... | ||
- | </code> | + | </code><code> |
root@gate:~# cat /etc/sarg/sarg-reports.conf | root@gate:~# cat /etc/sarg/sarg-reports.conf | ||
</code><code> | </code><code> | ||
... | ... | ||
- | HTMLOUT=/var/www/sarg | + | HTMLOUT=/var/www/html/sarg |
... | ... | ||
</code> | </code> | ||
Line 84: | Line 88: | ||
<code> | <code> | ||
root@gate:~# /usr/sbin/sarg-reports manual 07/02/2014 | root@gate:~# /usr/sbin/sarg-reports manual 07/02/2014 | ||
+ | |||
+ | root@gate:~# /usr/sbin/sarg-reports today | ||
</code> | </code> | ||