View previous topic :: View next topic |
Author |
Message |
flackbaume n00b
Joined: 02 Mar 2019 Posts: 3
|
Posted: Sat Mar 02, 2019 4:06 pm Post subject: Log messages spammed to console |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9678 Location: almost Mile High in the USA
|
Posted: Sat Mar 02, 2019 4:22 pm Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
flackbaume n00b
Joined: 02 Mar 2019 Posts: 3
|
Posted: Sun Mar 03, 2019 11:30 am Post subject: |
|
|
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
and
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9678 Location: almost Mile High in the USA
|
Posted: Sun Mar 03, 2019 4:20 pm Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
flackbaume n00b
Joined: 02 Mar 2019 Posts: 3
|
Posted: Mon Mar 04, 2019 10:03 am Post subject: |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9678 Location: almost Mile High in the USA
|
Posted: Tue Mar 05, 2019 12:43 am Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
|