Tomte Posted January 3 #1 Posted January 3 Hello, I receive regular kernel messages in kern.log and messages I would like to get rid of. They are growing the log files and preventing the HDDs from standby. one of this message is: 2025-01-03T15:07:35+01:00 Syno-S720 kernel: [ 2054.515999] synobios get empty ttyS current 2025-01-03T15:08:34+01:00 Syno-S720 kernel: [ 2113.656214] synobios get empty ttyS current 2025-01-03T15:09:35+01:00 Syno-S720 kernel: [ 2174.803813] synobios get empty ttyS current 2025-01-03T15:10:37+01:00 Syno-S720 kernel: [ 2235.968474] synobios get empty ttyS current 2025-01-03T15:11:38+01:00 Syno-S720 kernel: [ 2297.126995] synobios get empty ttyS current I already disabled all the serial ports in the BIOS, but the message keeps coming. I generated a file in :/usr/local/etc/syslog-ng/patterndb.d/Kernel.conf with the following contents: # filter Kernel Nachrichten source s_kernel { file("/proc/kmsg"); }; filter f_ignore_synobios { not match("synobios get empty ttyS current"); }; log { source(s_kernel); filter(f_ignore_synobios); destination(d_null); # Nachrichten an null senden }; However, it does not work. Does anyone have an idea, what I am missing? Regards, Tomte Quote
Tomte Posted January 3 Author #2 Posted January 3 (edited) I added to /usr/local/etc/syslog-ng/patterndb.d/include/not2kern a file called Kernel with and not filter(f_ignore_synobios) and changed /usr/local/etc/syslog-ng/patterndb.d/Kernel.conf to # filter Kernel Nachrichten filter f_ignore_synobios { match("synobios get empty ttyS current" value("MESSAGE")); }; log { source(src); filter(f_ignore_synobios); # destination(d_null); # Nachrichten an null senden }; Restarted syslog-ng, but still no success?!? Edited January 3 by Tomte code update Quote
Tomte Posted January 10 Author #3 Posted January 10 Ok, I made it work. I changed the filter to filter f_ttyS { match("empty ttyS" value("MESSAGE")); }; and the name of the filter accordingy at all other occurances. Furthermore, probably the key to success, I changed the access rights to -rw-r--r-- 1 root root 136 Jan 10 22:43 Kernel.conf with chmod 644 ... same for the files in not2kern and not2msg Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.