Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Log messages spammed to console
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
flackbaume
n00b
n00b


Joined: 02 Mar 2019
Posts: 3

PostPosted: Sat Mar 02, 2019 4:06 pm    Post subject: Log messages spammed to console Reply with quote

Hi,

I recently upgraded my system and started working with iptables. I made several changes to the kernel (4.19.23) and must have triggered some kind of logging feature somwhere on the way. Log messages are being redirected to the console, which is really annoying and makes working with the system almost impossible. I have not worked much with Linux logging features, so I don't really know where to start. My system uses systemd, so as far as I know, systemd-journald is responsible for logging messages. But even when I stop that

Code:
systemctl stop systemd-journald


my console is still being flushed by log messages. For example when plugging in my mouse:

Code:
multivac ~ # uname -a
Linux multivac 4.19.23-gentoo #5 SMP Sat Mar 2 12:20:34 CET 2019 x86_64 Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz GenuineIntel GNU/Linux
multivac ~ # [16980.141894] usb 1-1.6: USB disconnect, device number 8
[16984.153642] usb 1-1.6: new low-speed USB device number 9 using ehci-pci
[16984.238866] usb 1-1.6: New USB device found, idVendor=046d, idProduct=c06d, bcdDevice=81.00
[16984.239495] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[16984.240154] usb 1-1.6: Product: USB Laser Mouse
[16984.241087] usb 1-1.6: Manufacturer: Logitech
[16984.247250] input: Logitech USB Laser Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/0003:046D:C06D.0007/input/input11
[16984.299839] hid-generic 0003:046D:C06D.0007: input,hidraw2: USB HID v1.10 Mouse [Logitech USB Laser Mouse] on usb-0000:00:1a.0-1.6/input0

multivac ~ #


My first though was that some other logger must be installed, but i cannot figure out which one:

Code:
multivac ~ # equery list '*' | grep log
app-text/build-docbook-catalog-1.21
virtual/logger-0-r1


Where should I start looking? Is there some kind of kernel module that might be doing this? Any help would be much appreciated.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Sat Mar 02, 2019 4:22 pm    Post subject: Reply with quote

Are you normally using systemd-journald, or what logger are you using?

The default is to spew these kernel messages to the console if there is no logger running. For systemd, journald is the default logger and it will handle these messages. However I had a problem in the past where journald was not configured properly. In /etc/systemd/journald.conf you should add
Code:
ForwardToConsole=no
in the [Journal] section to stop journald to copy the logs to the console.

Normally one won't see these because systemd apparently assumes that you're using X11 and not using the text console...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
flackbaume
n00b
n00b


Joined: 02 Mar 2019
Posts: 3

PostPosted: Sun Mar 03, 2019 11:30 am    Post subject: Reply with quote

Hey eccerr0r, thank you for your reply. I do not make much use of the logging features, but when I do, I use systemd-journald (well, actually only journalctl). The messages are being redirected to console regardless of if journald is running or not. I did not experience this behaviour before, so somewhere along the way I must have triggered something. I already tried your suggestion (I also think it's the default), also

Code:
ForwardToWall=no


and


Code:
TTYPath=/dev/null


with no effect. Messages still being pushed to console. I have no expertise with the logging mechanism. How would one change the default logger? I found this page https://wiki.gentoo.org/wiki/Security_Handbook/Logging though it does not seem to take systemd into account. I also found some sites explaining how to forward logging messages through journald to some other logger, though the problems seems to be somehwere before journald comes into play.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Sun Mar 03, 2019 4:20 pm    Post subject: Reply with quote

Hmm... I must have forgotten what I did to get rid of them. However systemd-journald should log all messages...but whether the machine still displays them to console is another question.

However if you do run:

# dmesg -n 1

This seems to at least stop it temporarily?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
flackbaume
n00b
n00b


Joined: 02 Mar 2019
Posts: 3

PostPosted: Mon Mar 04, 2019 10:03 am    Post subject: Reply with quote

Yeah, that works. Now I only need to make that permanent. Thanks alot. I am still curious as to what triggered that logging fury. If I find out, I will post here.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Tue Mar 05, 2019 12:43 am    Post subject: Reply with quote

Might be oversight on the systemd install, not sure. It's the default ever since from when I switched over to systemd/journald.

I suspect just adding "dmesg -n 1" in you startup scripts is actually an acceptable workaround though not sure why it's not an option in the default install.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum