User Tools

Site Tools


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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_ротации_журналов [2017/11/07 10:18]
val [Linux Ubuntu Logrotate]
сервис_ротации_журналов [2017/11/30 15:16] (current)
val
Line 4: Line 4:
 <​code>​ <​code>​
 # cat /​etc/​logrotate.conf # cat /​etc/​logrotate.conf
 +</​code><​code>​
 ... ...
 include /​etc/​logrotate.d include /​etc/​logrotate.d
 ... ...
 </​code><​code>​ </​code><​code>​
 +# cat /​etc/​logrotate.d/​cisco
 +</​code><​code>​
 +/​var/​log/​cisco.log
 +{
 +     ​rotate 15
 +     size 10000k
 +     ​compress
 +     ​create 640 syslog adm
 +     ​postrotate
 +       ​reload rsyslog >/​dev/​null 2>&1 || true
 +     ​endscript
 +}
 +</​code><​code>​
 +# logrotate -d /​etc/​logrotate.d/​cisco
 +
 # logrotate /​etc/​logrotate.conf # logrotate /​etc/​logrotate.conf
 </​code>​ </​code>​
сервис_ротации_журналов.1510039115.txt.gz · Last modified: 2017/11/07 10:18 by val