On Thu, Mar 24, 2016 at 11:33 AM, Per Jessen
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.
slightly more complex:
# systemctl list-timers --all NEXT LEFT UNIT ACTIVATES Thu 2016-03-24 15:27:46 CET 6h left systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service Fri 2016-03-25 00:00:00 CET 14h left logrotate.timer logrotate.service [snip]
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".
# grep -i rotat /var/log/messages http://files.jessen.ch/saturn5-logrotate.txt
-- Per Jessen, Zürich (5.7°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org