User Tools

Site Tools


сервис_ротации_журналов

Сервис ротации журналов

Linux Logrotate

# cat /etc/logrotate.conf
...
include /etc/logrotate.d
...
# cat /etc/logrotate.d/cisco
/var/log/cisco.log
{
     rotate 15
     size 10000k
     compress
     create 640 syslog adm
     postrotate
       reload rsyslog >/dev/null 2>&1 || true
     endscript
}
# logrotate -d /etc/logrotate.d/cisco

# logrotate /etc/logrotate.conf

FreeBSD newsyslog

# cat /etc/newsyslog.conf
...
/var/log/cisco.log                      644  7     10   *     J
/var/log/httpd-access.log               644  10    1000 *     JC    /var/run/httpd.pid 30
/var/log/httpd-error.log                644  10    1000 *     JC    /var/run/httpd.pid 30
/var/log/httpd-ssl_request.log          644  10    1000 *     JC    /var/run/httpd.pid 30
# newsyslog
сервис_ротации_журналов.txt · Last modified: 2017/11/30 15:16 by val