[systemd-devel] Adding an option to prefix date time when journal forwards messages to console

Kay Sievers kay at vrfy.org
Tue Nov 12 07:53:12 PST 2013


On Tue, Nov 12, 2013 at 9:55 AM, Umut Tezduyar Lindskog

>> > We think being able to see the journal message timestamps on console is
>> important. A locked up embedded system where we only have the output of
>> console would be even more useful if we were to know when things went
>> wrong. For this reason, we would like to ask: is it ok if we have such feature
>> in journald.conf?
>>
>> The kernel controls this behaviour with the boolean:
>>   /sys/module/printk/parameters/time
>> maybe we could read just that?
>
> Should we keep the formatting same as kernel then?
>
> [   16.380000] systemd-journald[376]: Received request to flush runtime journal from PID 1
>
> Is there a way to get notified when the value of /sys/module/printk/parameters/time is changed? It might be expensive to read the value before every forward to console.

I guess it's fine to just read it once at journald startup. It's not
really that different from a kernel command line parameter, which
cannot changed at runtime. If printk.time is used, the parameter will
reflect that.

Kay


More information about the systemd-devel mailing list