Andrei Borzenkov wrote:
On Thu, Mar 24, 2016 at 11:33 AM, Per Jessen <per@computer.org> wrote:
In one way there's a certain elegance to the systemd timer concept, and it certainly seems very flexible. OTOH I'm not sure I like having two timer mechanisms.
However, I have been looking at logrotate.timer, and have a couple of questions:
a) what is the systemd equivalent of cron's MAILTO setting?
There are none. Theoretically all program output is (supposed to be) captured by journal which makes it redundant.
Really, you're serious?
Clearly logrotate.timer is due to fire tonight at midnight, very good. What I don't understand is why it (apparently) didn't fire on Thu 2016-03-24 00:00:00 CET and on Wed 2016-03-23 00:00:00 CET, see below:
# systemctl status logrotate.timer logrotate.timer - Daily rotation of log files Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; enabled) Active: active (waiting) since Tue 2016-03-22 15:13:37 CET; 1 day 18h ago Docs: man:logrotate(8) man:logrotate.conf(5)
Mar 22 15:13:37 saturn systemd[1]: Starting Daily rotation of log files. Mar 22 15:13:37 saturn systemd[1]: Started Daily rotation of log files.
Well, as it happens, it _did_ fire, but not according to the status above. What's funny is - on Tue 2016-03-22 15:13:37, it logged:
2016-03-22T15:13:37+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-22T15:13:37+01:00 saturn systemd[1]: Started Daily rotation of log files.
The last two days at midnight, those two messages do not appear:
They do according to the very log you posted. Assuming you are speaking about "saturn".
Yes, currently the host is "saturn" internally, "saturn5" externally. "saturn5" is meant to replace the ageing "saturn". You must have better glasses than me:
# grep -i rotat /var/log/messages http://files.jessen.ch/saturn5-logrotate.txt
grep 'Starting Daily rotation of log' saturn5-logrotate.txt 2016-03-11T10:03:11+01:00 guest54 systemd[1]: Starting Daily rotation of log files. 2016-03-11T23:22:16+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-13T15:22:03+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-18T14:59:04+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-20T17:52:31+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-20T20:26:03+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-22T14:43:37+01:00 saturn systemd[1]: Starting Daily rotation of log files. 2016-03-22T15:13:37+01:00 saturn systemd[1]: Starting Daily rotation of log files. In the log I see: 2016-03-24T00:00:01+01:00 saturn systemd[1]: Starting Rotate log files... 2016-03-24T00:00:01+01:00 saturn systemd[1]: Started Rotate log files. but that is not the description from logrotate.timer: # /usr/lib/systemd/system/logrotate.timer [Unit] Description=Daily rotation of log files Documentation=man:logrotate(8) man:logrotate.conf(5) Those last two lines are from # /usr/lib/systemd/system/logrotate.service [Unit] Description=Rotate log files Documentation=man:logrotate(8) man:logrotate.conf(5) Ah, I think I get it know - the message "Starting Daily rotation of log files" indicates the start of the _timer_ (on boot-up). The later message "Starting Rotate log file" is the timer kicking in and starting the _logrotate_. -- Per Jessen, Zürich (6.6°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org