FS#38613 - [syslog-ng] Kernel messages not being logged
Attached to Project:
Arch Linux
Opened by x33a (x33a) - Wednesday, 22 January 2014, 05:51 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 25 January 2014, 07:00 GMT
Opened by x33a (x33a) - Wednesday, 22 January 2014, 05:51 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 25 January 2014, 07:00 GMT
|
Details
Description:
After upgrading to syslog-ng 3.5.3-1, the kernel messages are not being logged to /var/log/everything.log. This probably happens due to the removal of file("/dev/kmsg"); from syslog-ng.conf. (https://bugs.archlinux.org/task/38382) After explicitly specifying file("/dev/kmsg"); in the configuration file, kernel messages start getting logged to everything.log. Note: I am using OpenRC instead of systemd. |
This task depends upon
I'll probably leave it as is because I can confirm that it works with systemd which is the default on Arch. It's a configuration file so the user can change it if needed (the old config was set for a sytemd setup).
So, just to clarify. When I use:
------------------
file("/proc/kmsg")
------------------
in the conf file, the kernel messages are logged.
If I remove this line, then system() uses /dev/kmsg. Even if I explicitly specify:
-----------------
file("/dev/kmsg")
-----------------
the kernel messages are not logged.
If this works fine with systemd, I guess you should leave it as it is.
It might also be interesting to see what it *attempts* to open during startup (via strace).
@ Dave,
here are the file descriptors using system():
/proc/1024/fd/:
total 0
lr-x------ 1 root root 64 Jan 23 19:59 0 -> /dev/null
l-wx------ 1 root root 64 Jan 23 19:59 1 -> /dev/null
lrwx------ 1 root root 64 Jan 23 19:59 10 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Jan 23 19:59 11 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Jan 23 19:59 12 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Jan 23 19:59 13 -> anon_inode:[eventfd]
l-wx------ 1 root root 64 Jan 23 19:59 2 -> /dev/null
lrwx------ 1 root root 64 Jan 23 19:59 3 -> anon_inode:[eventpoll]
l-wx------ 1 root root 64 Jan 23 19:59 4 -> pipe:[8084]
lrwx------ 1 root root 64 Jan 23 19:59 5 -> socket:[7151]
lrwx------ 1 root root 64 Jan 23 19:59 6 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Jan 23 19:59 7 -> /var/lib/syslog-ng/syslog-ng.persist
lrwx------ 1 root root 64 Jan 23 19:59 8 -> socket:[7148]
lr-x------ 1 root root 64 Jan 23 19:59 9 -> /dev/kmsg
Also, you can find the strace in the attachment.
Dmesg semantics are pretty flawed, couldn't come up with the ultimate solution.
@algernon was working in this area.
Yeah, I can confirm that with /proc/kmsg, dmesg is sourced on every restart of syslog-ng.
Great to know that work is being done in this direction.
@ Eric Belanger,
I think it is okay to close this bug now. I'll keep using /proc/kmsg until a fix emerges upstream.