Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: Gentoo Users List <gentoo-user@l.g.o>
Subject: [gentoo-user] Questions about logrotate
Date: Mon, 02 Nov 2020 12:08:07
Message-Id: 20201102120752.GA28198@waltdnes.org
1 Recent install is not rotating logs. "rc-update" shows cronie and
2 "sysklogd" at "default" level. Directory /etc/logrotate.d contains...
3
4 elog-save-summary hibernate-script openrc rsyncd
5
6 I assume that I have to create configs for various files in /var/log
7 Reading "man logrotate", and adapting for sysklogd and bzip2 I get the
8 following for /var/log/messages. I intend to rotate whenever the file
9 hits 3 megabytes. Does it look OK? Do I have to set up /etc/crontab?
10
11 ######################################
12
13 compress
14 compresscmd /bin/bzip2
15 compressoptions -9
16 nomail
17
18 /var/log/messages {
19 rotate 5
20 size 3M
21 postrotate
22 /usr/bin/killall -HUP sysklogd
23 endscript
24 }
25
26 ######################################
27
28 --
29 Walter Dnes <waltdnes@××××××××.org>
30 I don't run "desktop environments"; I run useful applications