OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Incredible amounts of kernel logs
DonOregano
post Jul 7 2018, 11:40 AM
Post #1





Group: Members
Posts: 24
Joined: 26-June 18
Member No.: 825,047



The amount of logs generated by the kernel in TP1 & TP2 is astounding. Is there any way to turn off or reduce these logs? They make the system log difficult to use for debugging other things...
Go to the top of the page
 
+Quote Post
Kiriririn
post Jul 7 2018, 02:16 PM
Post #2





Group: Members
Posts: 67
Joined: 19-January 18
Member No.: 816,673



You can install systemd from stretch-backports, and then set ReadKMsg=no (I think that setting may already be in place by default)
Go to the top of the page
 
+Quote Post
Murple2
post Jul 8 2018, 12:00 AM
Post #3





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



You should be able to
CODE
cat /proc/sys/kernel/printk w x y z


where you substitute the letters for the desired numbers below

0 - emergency
1 - alert
2 - critical
3 - error
4 - warning
5 - notice
6 - informational
7 - debug

Or you can put quiet in your kernel command line (or loglevel=X)

Or you can
CODE
sudo dmesg -n 1
or dmesg -D (off) and dmesg -E (on) to toggle console messages on/off

Or you create / edit /etc/sysctl.conf and add
CODE
kernel.printk = w x y z
substituting the numbers from above.

QUOTE(Kiriririn @ Jul 7 2018, 11:16 PM) *
You can install systemd from stretch-backports, and then set ReadKMsg=no (I think that setting may already be in place by default)


I wouldn't install systemd just to get functionality that already exists several times over. But if you do then be aware that recent versions of systemd no longer read /etc/sysctl.conf and look in /etc/sysctl.d/*.conf
Go to the top of the page
 
+Quote Post
Kiriririn
post Jul 8 2018, 03:14 AM
Post #4





Group: Members
Posts: 67
Joined: 19-January 18
Member No.: 816,673



QUOTE(Murple2 @ Jul 8 2018, 09:00 AM) *
You should be able to
CODE
cat /proc/sys/kernel/printk w x y z


where you substitute the letters for the desired numbers below

0 - emergency
1 - alert
2 - critical
3 - error
4 - warning
5 - notice
6 - informational
7 - debug

Or you can put quiet in your kernel command line (or loglevel=X)

Or you can
CODE
sudo dmesg -n 1
or dmesg -D (off) and dmesg -E (on) to toggle console messages on/off

Or you create / edit /etc/sysctl.conf and add
CODE
kernel.printk = w x y z
substituting the numbers from above.

QUOTE(Kiriririn @ Jul 7 2018, 11:16 PM) *
You can install systemd from stretch-backports, and then set ReadKMsg=no (I think that setting may already be in place by default)


I wouldn't install systemd just to get functionality that already exists several times over. But if you do then be aware that recent versions of systemd no longer read /etc/sysctl.conf and look in /etc/sysctl.d/*.conf


All of those only affect what is printed to TTYs, which in this case would be the serial console

It's not clear whether the OP is referring to that, to dmesg, or to the systemd journal
Go to the top of the page
 
+Quote Post
Murple2
post Jul 8 2018, 09:07 AM
Post #5





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(Kiriririn @ Jul 8 2018, 12:14 PM) *
QUOTE(Murple2 @ Jul 8 2018, 09:00 AM) *
You should be able to
CODE
cat /proc/sys/kernel/printk w x y z


where you substitute the letters for the desired numbers below

0 - emergency
1 - alert
2 - critical
3 - error
4 - warning
5 - notice
6 - informational
7 - debug

Or you can put quiet in your kernel command line (or loglevel=X)

Or you can
CODE
sudo dmesg -n 1
or dmesg -D (off) and dmesg -E (on) to toggle console messages on/off

Or you create / edit /etc/sysctl.conf and add
CODE
kernel.printk = w x y z
substituting the numbers from above.

QUOTE(Kiriririn @ Jul 7 2018, 11:16 PM) *
You can install systemd from stretch-backports, and then set ReadKMsg=no (I think that setting may already be in place by default)


I wouldn't install systemd just to get functionality that already exists several times over. But if you do then be aware that recent versions of systemd no longer read /etc/sysctl.conf and look in /etc/sysctl.d/*.conf


All of those only affect what is printed to TTYs, which in this case would be the serial console

It's not clear whether the OP is referring to that, to dmesg, or to the systemd journal


I'm guessing systemd journal isn't installed seeing as you are suggesting the OP installs systemd. Your suggestion just disables kernel messages within the journald, which probably isn't what the OP wanted (particularly if it isn't even installed!). I also think my suggestions would suppress messages to other programs (eg journald) and not just the TTYs as you assert. (OK I admit, some of the suggestions not all)

Edit : Sorry,, I've given up smoking and I'm a little tetchy...
Go to the top of the page
 
+Quote Post
DonOregano
post Jul 11 2018, 02:30 AM
Post #6





Group: Members
Posts: 24
Joined: 26-June 18
Member No.: 825,047



Well, to clarify what I was after, I wanted to be able to use dmesg -w without getting drowned in stuff, and journalctl -f without getting inundated.
On a "normal" debian system I have never had these amounts of logs. Also I was thinking that with the amount of logging there must be a little too much disk access being generated, which would reduce battery life...
Go to the top of the page
 
+Quote Post
mithrandir
post Jul 11 2018, 02:43 AM
Post #7





Group: Members
Posts: 120
Joined: 7-January 18
Member No.: 815,997



QUOTE(DonOregano @ Jul 11 2018, 02:30 AM) *
Well, to clarify what I was after, I wanted to be able to use dmesg -w without getting drowned in stuff, and journalctl -f without getting inundated.
On a "normal" debian system I have never had these amounts of logs. Also I was thinking that with the amount of logging there must be a little too much disk access being generated, which would reduce battery life...

I think the journal does not get persisted. At least journalctl -b1 tells "no persisted journal was found". So there should be no disk access. However, the exessive logging at least generates some CPU usage which consumes a bit battery.
Go to the top of the page
 
+Quote Post
Kiriririn
post Jul 11 2018, 04:45 AM
Post #8





Group: Members
Posts: 67
Joined: 19-January 18
Member No.: 816,673



QUOTE(DonOregano @ Jul 11 2018, 11:30 AM) *
Well, to clarify what I was after, I wanted to be able to use dmesg -w without getting drowned in stuff, and journalctl -f without getting inundated.
On a "normal" debian system I have never had these amounts of logs. Also I was thinking that with the amount of logging there must be a little too much disk access being generated, which would reduce battery life...


My above suggestion hides kernel logs from journalctl, but doesn't help with dmesg. In my kernel fork you can find a couple of commits that hack out the worst offenders https://github.com/lukefor/gemini-linux-kernel-3.18

You may also want to disable logd, which is the worst for CPU usage - see https://www.oesf.org/forum/index.php?showtopic=35245

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th October 2019 - 03:35 AM