[systemd-devel] generator logging during daemon-reload

Alexandre Detiste alexandre.detiste at gmail.com
Mon Nov 10 11:30:17 PST 2014


>> Yes, but then the log appears as a ugly big chunck without the
>> timestamp & host on the left; 
> > except the first line. Is it ok to reopen /dev/ksmg for each line
> > writen to avoid this ?
> 
> Not sure I follow?

This might be a trivial problem; it's just that there are really few people
writing generators or outputing do /dev/kmsg .

Here is a sample test case the 2 different behaviours,
maybe a "flush" after the "write" would do it:

root at antec:/home/tchet# cat log
<4> log1: log1
<4> log2: log2
<4> log3: log3
<4> log4: log4
root at antec:/home/tchet# LANG=C dd if=log of=/dev/kmsg
0+1 records in
0+1 records out
60 bytes (60 B) copied, 0.000114992 s, 522 kB/s
root at antec:/home/tchet# while read level pgm msg; do echo $level $pgm $msg > /dev/kmsg; done < log
root at antec:/home/tchet# journalctl -n
...
nov 10 20:25:06 antec log1: log1
                            <4> log2: log2
                            <4> log3: log3
                            <4> log4: log4
nov 10 20:25:20 antec log1: log1
nov 10 20:25:20 antec log2: log2
nov 10 20:25:20 antec log3: log3
nov 10 20:25:20 antec log4: log4
 
> Yes, that's really not an OK thing to do. /usr/sbin/sendmail ...
Ok, I don't want to test this with 20 differents MTA anyway.


More information about the systemd-devel mailing list