Ken Moffat wrote: > On Sun, Apr 20, 2014 at 03:19:45PM -0500, Bruce Dubbs wrote: >> >> Last night I was trying to figure out how to set the dmesg log level in >> systemd. It turns out that it can be done with sysctl and set: >> >> kernel.printk = 4 4 1 7 >> >> where the numbers are console_loglevel, default_message_loglevel, >> minimum_console_loglevel, and default_console_loglevel. The only number >> we really are concerned with is the first. >> >> This can be done in either sysd or sysv, but it's not as simple as >> setting LOGLEVEL=4 and then use dmesg -n $LOGLEVEL in a script which is >> how we do it now. >> > > I think that ought to be documented somewhere in LFS. Googling for > this, all that came up was a recommendation from Arch to pass > loglevel=4 [ they actually recommend 3 ] among the boot arguments. > > Also, I haven't ever needed to use sysctl in the past - it appears > to be something that is set at runtime, so if I had needed it I > would have put it in an initscript. If I do this with systemd, how > am I _supposed_ to do it ? [ google is not helpful, or I've got the > wrong search args ].
Hmm. http://www.linuxfromscratch.org/lfs/view/development/chapter07/sysd-custom.html 7.1.1: "The /etc/systemd/system.conf file contains a set of items to control basic operations. The default file has all entries commented out with the default settings indicated. This file is where the log level may be changed as well as some basic journal settings." Perhaps I need to make that more obvious. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page