From: "Walter Dnes" <waltdnes@waltdnes.org>
To: Gentoo Users List <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] Questions about logrotate
Date: Mon, 2 Nov 2020 07:07:52 -0500 [thread overview]
Message-ID: <20201102120752.GA28198@waltdnes.org> (raw)
Recent install is not rotating logs. "rc-update" shows cronie and
"sysklogd" at "default" level. Directory /etc/logrotate.d contains...
elog-save-summary hibernate-script openrc rsyncd
I assume that I have to create configs for various files in /var/log
Reading "man logrotate", and adapting for sysklogd and bzip2 I get the
following for /var/log/messages. I intend to rotate whenever the file
hits 3 megabytes. Does it look OK? Do I have to set up /etc/crontab?
######################################
compress
compresscmd /bin/bzip2
compressoptions -9
nomail
/var/log/messages {
rotate 5
size 3M
postrotate
/usr/bin/killall -HUP sysklogd
endscript
}
######################################
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
reply other threads:[~2020-11-02 12:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201102120752.GA28198@waltdnes.org \
--to=waltdnes@waltdnes.org \
--cc=gentoo-user@lists.gentoo.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox