/var/log/kern.log nach /dev/null umleiten

Gast #5631951
Lesenswert?

Das Problem ist, dass das das Log des Hostsystems* zu sein scheint. Oder 
es wird alles aus allen Containern reingestopft. Jedenfalls kommen 
relativ schnell hunderte MB zusammen. Logrotate komprimiert den ganzen 
Mist dann noch, was auch noch Rechenzeit frisst.
Deswegen würde ich das Ganze gerne so unbürokratisch einfach 
aussperren...


* Hinweise: https://github.com/lxc/lxd/issues/3148
Gast #5631972
Lesenswert?

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711170
1
FWIW, I experienced the same messed-up logs some time ago when running
2
rsyslog in an LXC guest. I circumvented that by disabling kernel logging
3
support in the guest as follows:
4

5
diff --git a/rsyslog.conf b/rsyslog.conf
6
index 2a7f9f9..94fff07 100644
7
--- a/rsyslog.conf
8
+++ b/rsyslog.conf
9
@@ -9,7 +9,7 @@
10
 #################
11
 
12
 $ModLoad imuxsock # provides support for local system logging
13
-$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
14
+#$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
15
 #$ModLoad immark  # provides --MARK-- message capability
16
 
17
 # provides UDP syslog reception
Gast #5632009
Lesenswert?

Luigi schrieb:
> Das Problem ist, dass das das Log des Hostsystems* zu sein scheint. Oder
> es wird alles aus allen Containern reingestopft. Jedenfalls kommen
> relativ schnell hunderte MB zusammen. Logrotate komprimiert den ganzen
> Mist dann noch, was auch noch Rechenzeit frisst.
> Deswegen würde ich das Ganze gerne so unbürokratisch einfach
> aussperren...
>
>
> * Hinweise: https://github.com/lxc/lxd/issues/3148

Du hast auch ein Debiansystem mit systemd?
journald leitet den Kram doch imo einfach weiter.



/etc/systemd/journald.conf

ReadKMsg=no

systemctl restart systemd-journald.service

------

https://www.freedesktop.org/software/systemd/man/journald.conf.html


ReadKMsg=

    Takes a boolean value. If enabled (the default), journal reads 
/dev/kmsg messages generated by the kernel.

------

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren