1 |
On Tuesday, 20 August 2019 01:05:37 BST n952162 wrote: |
2 |
> I have two gentoo machines, my primary one and one I cloned off of that. |
3 |
> |
4 |
> The original gentoo machine has lots of nice /var/log/syslog.1.gz, etc. |
5 |
> files. |
6 |
> |
7 |
> The clone has one big /var/log/syslog file. |
8 |
> |
9 |
> I now have logrotate installed in both machines. I see that the |
10 |
> original has cronie installed and an /etc/cron.daily/logrotate file, but |
11 |
> that corresponding /etc/logrotate configuration file does not list any |
12 |
> of the important syslog, kern.log, etc files. |
13 |
> |
14 |
> When I do as /etc/cron.daily/logrotate does: |
15 |
> |
16 |
> sudo /usr/bin/logrotate -v /etc/logrotate.conf |
17 |
> |
18 |
> I get debug output that shows it does only what /etc/logrotate.conf |
19 |
> tells it to do. And syslog, etc. are not touched. |
20 |
> |
21 |
> Could it be that there's another facility that's doing that work? |
22 |
|
23 |
Installed apps which are cognizant of logrotate install their config for |
24 |
rotation in /etc/logrotate.d/ |
25 |
|
26 |
The syslog-ng package installs this file by default: |
27 |
|
28 |
~ # cat /etc/logrotate.d/syslog-ng |
29 |
# |
30 |
# Syslog-ng logrotate snippet for Gentoo Linux |
31 |
# contributed by Michael Sterrett |
32 |
# |
33 |
|
34 |
/var/log/messages { |
35 |
missingok |
36 |
sharedscripts |
37 |
postrotate |
38 |
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true |
39 |
endscript |
40 |
} |
41 |
|
42 |
which corresponds to the only log file created by syslog-ng as a default. If |
43 |
you alter the configuration to capture/filter/record different syslog-ng |
44 |
outputs, then you'll have to add your own logrotate configuration, either in / |
45 |
etc/logrotate.d/syslog-ng itself, or in additional files. |
46 |
|
47 |
Are the two systems identical in terms of the syslog-ng config and *all* the |
48 |
logrotate config files? |
49 |
|
50 |
-- |
51 |
Regards, |
52 |
|
53 |
Mick |