[systemd-devel] Questions I got about systemd

Bardur Arantsson spam at scientician.net
Wed Dec 11 10:56:03 PST 2013


On 2013-12-11 19:41, Zbigniew Jędrzejewski-Szmek wrote:
> On Wed, Dec 11, 2013 at 08:24:34PM +0200, Mantas Mikulėnas wrote:
>> On Dec 11, 2013 5:38 PM, "Cecil Westerhof" <Cecil.Westerhof at snow.nl> wrote:
>>>
>>> On 12/06/2013 01:18 PM, Mantas Mikulėnas wrote:
>>>>
>>>>  > Is it possible to do an automatic shutdown when there is no more room
>>>> to for journald to log? (They did not want to have logging removed.)
>>>>
>>>> Currently no. journald tries to never use more than the configured % of
>>>> disk space and rotates away old logs, so it won't ever see a "disk full"
>>>> error. But a syslog daemon might help.
>>>
>>>
>>> The person asking it found it not acceptable that logging disappeared.
>> But it could be done by a cron job of-course.
>>
>> Logging does not disappear; /old/ logs do. If they need to be preserved,
>> run a syslog daemon (either local with /var/log/syslog or remote with a
>> logserver), or periodically back up old (rotated) .journals... Or, well,
>> post a feature request? (Actually, I wonder what happens if you set the
>> maximum to 100% of disk...)

> I vaguely remember that something like this was already discussed a
> few years ago. For some certifications (medical?), it is required to 
> shut down if logging is not possible. 

I don't think that's even theoretically possible unless *everything* is
running fully synchronously, including writing to disk and the LAZORS
(well, electromagnetic beams) that are hitting the patient.

If you just want some measure of assurance, here's a few things that one
could try:

  a) have a dedicated logging partition which nothing else writes to,

and

  b) calculate an upper bound on the rate and size of log messages,

which both combine to give you the option of doing:

  c) try to anticipate a "log full" condition some time in advance
     (given the above bounds and how much space is left) and shut
     things down preemptively before reaching the "log is full"
     condition.

(This would involve using a dedicated logging daemon, obviously.)

Regards,




More information about the systemd-devel mailing list