Reset linux console log level

  • Get current console print log level:
sysctl kernel.printk

For instance, if the output is 4 4 1 7, you can reset it.

  • Reset console print log level:
sysctl -w kernel.printk="2 4 1 7"

CUR = current severity level; only messages more important than this level are printed
DEF = default severity level assigned to messages with no level
MIN = minimum allowable CUR
BTDEF = boot-time default CUR

While another saying is console_loglevel, default_message_loglevel, minimum_console_loglevel, default_console_loglevel. Refer to here.

Log level 7 4 1 7 to 3 4 1 3 is demonstrated as below:

                     CUR  DEF  MIN  BTDEF
0 - emergency        x              x                        
1 - alert            x         x    x
2 - critical         x              x
3 - error            x              x
4 - warning          x    x         x
5 - notice           x              x
6 - informational    V              V
7 - debug            
                     CUR  DEF  MIN  BTDEF
0 - emergency        x              x                        
1 - alert            x         x    x
2 - critical         x              x
3 - error            V              V
4 - warning               x         
5 - notice                           
6 - informational                   
7 - debug         

Refer to Severity_levels.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容