ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Roman Lesnichenko <community@donec.net>
To: community@altlinux.ru
Subject: Re: [Comm] Squid log analizer SARG
Date: Thu, 25 Nov 2004 22:36:14 +0200
Message-ID: <200411252236.15075.community@donec.net> (raw)
In-Reply-To: <41A5A6BA.4020306@pribor.kharkov.ua>

В сообщении от Четверг 25 Ноябрь 2004 11:32 Oleg Shulga написал(a):


> man sarg на предмет -o и -e
>
> -o dir Writes report in dir.
> -e email
>               Sends report to email (stdout for console).
Так в том-то и дело, что сразу и ман Ж)
Не пишет оно ничего никуда Ж(
>
>
> ALM 2.4
> squid 2.5.STABLE7
> sarg-2.0.1
> gcc3.3.3
Именно.
>
> Все работает так.
> в /etc/logrotate.d/ прибит squid.
Этого не было, щас прибил.
> используются три скрипта (для daily, weekly, monthly)
> в последнем есть строчка squid -k rotate.
> в трех скриптах используется различный -o
> кроме того есть один daily с -e
> вот пример
Все так-же само.
>
Вот мой

cat /etc/cron.daily/sarg.daily
#!/bin/bash

#Get date
TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date --date "1 day ago" +%d/%m/%Y)

/usr/bin/sarg -o /var/www/html/squid/daily -z -x -d $YESTERDAY-$TODAY
#> /dev/null 2>&1

exit 0

Для полноты счастья даже -x воткнул, все равно ничего никуда не пишется:
[root@romka cron.daily]# ./sarg.daily
SARG: Init
SARG: Loading configuration from: /usr/local/sarg/sarg.conf
SARG: ConfigFile.........= /usr/local/sarg/sarg.conf
SARG: AccessLog..........= /var/log/squid/access.log
SARG: BgColor............= background_color white
SARG: TxColor............= #000000
SARG: TxBgColor..........= lavender
SARG: TiColor............= green
SARG: LogoImage..........=
SARG: LogoText...........=
SARG: LogoTextColor......= #000000
SARG: Width..............= 80
SARG: Height.............= 45
SARG: Title..............= Squid User Access Reports
SARG: BgImage............=
SARG: FontFace...........= Tahoma,Verdana,Arial
SARG: HeaderColor........= darkblue
SARG: HeaderBgColor......= blanchedalmond
SARG: FontSize...........= 9px
SARG: PasswdFile.........=
SARG: TempDir............= /tmp
SARG: OutputDir..........= /var/www/html/squid
SARG: Ip2Name............= yes
SARG: TopuserSortField.........= BYTES
SARG: UserSortField.........= BYTES
SARG: TopuserSortOrder.........= reverse
SARG: UserSortOrder.........= reverse
SARG: UserAgentLog.......=
SARG: ExcludeHosts.......=
SARG: DateFormat.........= e
SARG: ExcludeUsers.......=
SARG: PerUserLimitFile...=
SARG: PerUserLimit.......=
SARG: UserIp.............= yes
SARG: MaxElapsed.........= 28800000
SARG: LastLog............= 0
SARG:
SARG: Параметры:
SARG:
SARG:                    Имя или IP-адрес (-a) =
SARG:                    Журнал броузеров (-b) =
SARG:                     Файл исключений (-c) =
SARG:                          Дата от-до (-d) = 24/11/2004-25/11/2004
SARG:     E-mail адрес для посылки отчета (-e) =
SARG:                   Файл конфигурации (-f) = /usr/local/sarg/sarg.conf
SARG:                         Формат даты (-g) = Европа (dd/mm/yyyy)
SARG:                            IP отчет (-i) = Нет
SARG:                     Входящий журнал (-l) = /var/log/squid/access.log
SARG:               Определение IP-адреса (-n) = Да
SARG:                    Выходной каталог (-o) = /var/www/html/squid/daily/
SARG: Использовать Ip-адрес вместо имени пользователя (-p) = Да
SARG:                              Адреса (-s) =
SARG:                               Время (-t) =
SARG:                                 Имя (-u) =
SARG:                   Временный каталог (-w) = /tmp
SARG:                Отладочные сообщения (-x) = Да
SARG:                   Рабочие сообщения (-z) = Да
SARG:
SARG: sarg версия: 2.0.1 04Oct2004
SARG: Чтение файла журнала: /var/log/squid/access.log
SARG: Records in file: 634, reading: 95.74%
SARG:    Записей прочитано: 607, записано: 0, исключены: 0
SARG: Журнал в Squid-формате
SARG: Записи не найдены
SARG: Завершено


-- 
With best wishes,
Roman.

  reply	other threads:[~2004-11-25 20:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25  1:06 Roman Lesnichenko
2004-11-25  3:04 ` Беляев Владимир Николаевич
2004-11-25  5:03 ` Nizamov Shavkat
2004-11-25  5:27   ` Mike Lykov
2004-11-25 23:07   ` Roman Lesnichenko
2004-11-25  6:44 ` Beshkov Andrew
2004-11-25  7:33 ` Alexey Morsov
2004-11-25  8:32   ` Re[2]: " Беляев Владимир Николаевич
2004-11-25  9:32 ` Oleg Shulga
2004-11-25 20:36   ` Roman Lesnichenko [this message]
2004-11-26  8:44     ` Oleg Shulga
2004-11-26 10:27       ` Nizamov Shavkat
2004-11-26 11:31         ` Oleg Shulga
2004-11-26 12:10           ` Roman Lesnichenko
2004-11-26 13:39             ` Andriy Dobrovol's'kii
2004-11-26 13:56               ` Roman Lesnichenko
2004-11-26 14:05                 ` Andriy Dobrovol's'kii
2004-11-27  0:34                   ` Roman Lesnichenko
2004-11-26 14:23             ` Oleg Shulga
2004-11-27  0:42               ` Roman Lesnichenko
2004-11-29  9:44                 ` Oleg Shulga
2004-11-29 19:33                   ` Roman Lesnichenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411252236.15075.community@donec.net \
    --to=community@donec.net \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git