6

Because of some hot-plugging issue, similar to what talked of here, the TTY displays show a continuous stream of messages (which are also logged in the /var/log directory). Every text I key in flows away visually, but it does take the inputs (I can log in and run commands).

Is there a way to prevent such error and/or any other broadcast messages from flooding the TTYs?

Update: Here's the content of the requested file /etc/rsyslog.conf:

#  /etc/rsyslog.conf    Configuration file for rsyslog.
#
#           For more information see
#           /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
#  Default logging rules can be found in /etc/rsyslog.d/50-default.conf


#################
#### MODULES ####
#################

$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
#$ModLoad immark  # provides --MARK-- message capability

# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514

# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on

###########################
#### GLOBAL DIRECTIVES ####
###########################

#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# Filter duplicated messages
$RepeatedMsgReduction on

#
# Set the default permissions for all log files.
#
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog

#
# Where to place spool files
#
$WorkDirectory /var/spool/rsyslog

#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
rusty
  • 1,841
  • 6
  • 21
  • 25
  • 1
    Have you tried to see if `mesg n` stops the flood? If not you might try playing with `setterm -msglevel` to find the right setting for you. – Bratchley Jan 02 '15 at 14:22
  • A related question would be - why are some kernel related messages seen on the console, and others are not? What determined what message is seen where? – Faheem Mitha Jan 02 '15 at 14:44
  • @precise Show us your syslog or rsyslog configuration files. `cat /etc/rsyslog.conf` `cat /etc/syslog.conf` – PaperMonkey Jan 02 '15 at 15:24
  • @Bratchley the problem's has suddenly disappeared but I tried them with test broadcasts.. unfortunately both `mesg n` and `setterm` with switch -msglevel 0 and -msg off didn't help.. – rusty Jan 05 '15 at 14:43
  • @PaperMonkey edited the post as you asked.. are the configurations fine? – rusty Jan 05 '15 at 14:44
  • @precise There's going to be a config file in `/etc/rsyslog.d/*.conf` don't know the name. But in that file it will mention `/dev/console` that where all Kernel messages like you describe are being directed to. Bratchley's suggestion is spot on to prevent it but if you want to know why it's being redirected look for that file. – PaperMonkey Jan 05 '15 at 15:32
  • `daemon.*;mail.*;\ news.err;\ *.=debug;*.=info;\ *.=notice;*.=warn |/dev/xconsole` ..these are the line.. and about `mesg n`, I should use that on the terminal/emulator being flooded right? or is there some files that I'll have to edit? – rusty Jan 05 '15 at 16:22
  • @PaperMonkey tried `mesg n` in the kernel message flood and like in test run, it didn't help.. I'm supposed to enter the command, right? because that's what i tried.. – rusty Jan 07 '15 at 06:31

1 Answers1

1

The easy workaround is to comment out this line in /etc/rsyslog.conf:

# Everybody gets emergency messages
#*.emerg                    :omusrmsg:*

At least it worked for my RHEL 7.9 box.

To preserve these messages and make them easy to find, you could write them to a specific file. Something like this:

*.emerg                    /var/log/remote.log

Yes. That setting as a default is super intrusive. On a syslog server, any server in the environment throwing emerg messages can flood the console.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
Daniel
  • 11
  • 1