Stop syslog messages from being sent to all open terminals
Andrew Henderson
We have a hardware problem on one of our servers, and the kernel is continuously spitting out messages like this:
kernel: EDAC MC0: UE row 0, channel-a= 0 channel-b= 1 labels "-": NON-FATAL recoverable (Branch=0 DRAM-Bank=0 Buffer ID = 0 RDWR=Read RAS=0 CAS=0 NON-FATAL recoverable Err=0x2000 (FB-DIMM Configuration Write error on first attempt))In addition to logging the messages in /var/log/messages, it is sending them to all logged in terminal sessions (not just the system console).
While it is good to be informed (and of course we will fix the RAM issue) it is making it impossible to work on this server; the messages come out in the middle of editing lines, files, whatever.
How can I suppress these messages? Ideally I'd like to be able to do it for my current session leaving other users getting the messages.
The system is Centos 5.
1 Answer
It seems syslogd will send messages to all uses via 'wall' if '*' is used as a destination in the /etc/syslogd.conf file.
The default config has this line in it:
*.emerg *Commenting this line out and reloading syslogd completely suppressed the messages, but you'd better remember to re-enable them later.
I did not find a way to supress them for just one session. The command 'mesg' should be able to stop incoming messages in a session, but it did not stop these messages.