24.03.2016 12:35, Per Jessen пишет:
Andrei Borzenkov wrote:
On Thu, Mar 24, 2016 at 11:33 AM, Per Jessen
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?
journal was not my idea, but you have you know your enemy. And yes, I think that storing everything in one place and then filtering as needed is at the end more productive than reinventing the wheel for every individual use case.
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:
You misunderstand. The actual log rotation (logrotate.service) has description "Rotate log files" and happens every day at 00:00 give or take couple of seconds. What you see is (re-)starting of *timer* unit itself. Why exactly it happens needs some more investigation, but is not related to actual log rotation. ...
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_.
Oops. I had read full befyore answering :)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org