logrotate

Lumír Jasiok lumir.jasiok na vsb.cz
Úterý Duben 6 07:21:11 CEST 2004


On Mon, 5 Apr 2004, pavel pivonka wrote:

> Ahoj vsem,
> potrebuji narychlo zkonfigurovat logrotate. Normalni logy, ktere jsou ve
> /var-log rotuji OK. Ale treba log od squida nerotuje. Stale prirusta a
> ted dosahl velikosti 2 GB. Logrotate ma konfigurak logrotate conf, kde
> je:
>  
>  
>  
> #
> #       Logrotate fragment for squid.
> #
> /var/log/squid/*.log {
>         daily
>         compress
>         delaycompress
>         rotate 2
>         missingok
>         nocreate
>         sharedscripts
>         prerotate
>                 test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
>         endscript
>         postrotate
>                 test ! -e /var/run/squid.pid || /usr/sbin/squid -k
> rotate
>         endscript
> }
>  
>  
> Potrebuju, aby vsechny file ve NIKDY neprerostli velikost 100 MB (kazdy
> z nich)
>  
Dobry den,

ja mam configurak pro squid takovy:

-----------------------------------------------------------------------------
# see "man logrotate" for details
# rotate log files weekly
#weekly

# keep 4 weeks worth of backlogs
#rotate 4

# create new (empty) log files after rotating old ones
#create

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
#include /etc/logrotate.d

# proxy.neco.cz # SQUID
/cache/log/squid/* {
           daily
           postrotate
              kill -HUP `cat /var/run/squid.pid` 
           endscript
           compress
           mail admin na neco.cz
}
------------------------------------------------------------------------------------

Jinak Squid umi primo rotovat logy. Viz. dokumentace ke squidu.

S pozdravem

Lumir Jasiok

--

 Lumír Jasiok
 Network administrator        
 Student VSB-TU Ostrava
 Mobile: +420 736 627 246
 E-mail: lumir.jasiok na vsb.cz
 http://www.vsb.cz
															




Další informace o konferenci Linux