SUSE Support

Here When You Need Us

Kernel messages output log level not as expected

This document (000021798) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12


Situation

When viewing the current effective loglevel values, the value in the first column (which represents the current console_loglevel value) is not set to the default or the intended value:

     # sysctl kernel.printk
     kernel.printk = 1    4    1    7
     #  cat /proc/sys/kernel/printk
     1    4    1    7

Resolution

Remove the $klogConsoleLogLevel parameter setting or set it to the desired level.

Cause

This can be due to the presence of the $klogConsoleLogLevel parameter setting in the /etc/rsyslog.conf file.

Additional Information

All of the rsyslog versions shipped with the following versions of SUSE Linux Enterprise Server added the $klogConsoleLogLevel setting (with a value of 1) to the /etc/rsyslog.conf file:

SUSE Linux Enterprise Server 12 (All versions)
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 15 SP1
SUSE Linux Enterprise Server 15 SP2
SUSE Linux Enterprise Server 15 SP3


With SUSE Linux Enterprise Server 15 SP4, versions of rsyslog prior to rsyslog-8.2106.0-150400.5.11.1 also added the $klogConsoleLogLevel parameter to /etc/rsyslog.conf

With rsyslog-8.2106.0-150400.5.11.1 and later versions, the $klogConsoleLogLevel parameter is removed during the installation of rsyslog.

Be aware that different quarterly releases of SLES 15 SP4 can contain different versions of programs including rsyslog e.g. :

SUSE Linux Enterprise Server 15 SP4 (Initial release)rsyslog 8.2106.0-150400.3.1
SUSE Linux Enterprise Server 15 SP4 QU3rsyslog 8.2106.0-150400.5.11.1
SUSE Linux Enterprise Server 15 SP4 QU4rsyslog 8.2306.0-150400.5.27.1

All of the versions of rsyslog available for SLES 15 SP5 and later, do not set the $klogConsoleLogLevel parameter.

Note that even if the $klogConsoleLogLevel is present in the /etc/resyslog.conf file, it will only be applied if the systemd rsyslog.service was started at some point during the current running environment.

Note that if server management software is being used, it could be overwriting configuration files with versions that contain old, redundant or unwanted parameters, especially if the files being copied originated from older SLES versions.

Other useful information on the topic of loglevel:
      Syslog man pages: # man 2 syslog
      Temporarily changing kernel loglevel using dmesg: # man dmesg      (look @ -n, --console-level)
      Temporarily changing all loglevel values using echo: e.g.  # echo '3 4 1 7' > /proc/sys/kernel/printk
      Optional kernel.printk entry in /etc/sysctl.conf, used to permanently change loglevel values
                e.g.  Add line:  kernel.printk = 7 4 1 3
                to enable without a reboot use: # sysctl -p

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021798
  • Creation Date: 21-Apr-2025
  • Modified Date:15-May-2025
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.