[syslog-ng] stupid question: syslogging plaintext non-syslog-format messages unchanged (netconsole)

Nix nix at esperi.org.uk
Wed Nov 11 22:23:29 CET 2009


[Sorry about the delay, reading lists intermittently right now owing to
 far too much travel]

On 3 Nov 2009, Balazs Scheidler spake thusly:
> On Tue, 2009-10-20 at 21:30 +0100, Nix wrote:
>> So, what am I missing? It's probably incredibly obvious, but I've blown
>> several hours hacking at configs and digging through the syslog-ng
>> source and have seen nothing to indicate what's going on...
>
> Hmm, I guess that the kernel outputs those characters as individual UDP
> frames, right? At least syslog-ng probably receives them as individual
> packets, perhaps because a single line of kernel message is generated by
> separate printk() invocations in the kernel source. /proc/kmsg is not
> packet terminated.

You're probably right, but most of the time when this happens the
kernel is oopsing, so it's sort of hard to get a packet dump :)

However, certainly in this case those linefeed-terminated things are
separate printk()s, and, hm, looking at the netconsole source every
printk() yields an immediate UDP packet, without buffering. (This makes
sense given the last-ditch nature of netconsole: even doing this, it
sometimes lops chunks off the ends of panics.)

> However I've personally used syslog-ng for netconsole, and I can't
> remember having this issue.
>
> Can you confirm that this is the case?

Looks like it. End-of-packet shuld not imply linefeed in this case (I
suspect real linefeeds get sent across the line, and we should never add
linefeeds merely because a packet has ended. At least not for this
application.)


More information about the syslog-ng mailing list