The procsyskernelprintk file defines four numbers. Execute: catprocsyskernelprintk4417 ① console Log Level: messages with a higher priority will be printed to the console. ② Default Message Log Level: this value is used to print messages with no priority. ③ Lowest console Log Level: available at the console Log Level
The/proc/sys/kernel/printk file defines four numbers and runs:
Cat/Proc/sys/kernel/printk
4 4 1 7
① Console Log Level: messages with a higher priority will be printed to the console.
② Default Message Log Level: this value is used to print messages with no priority.
③ Lowest console log level: the minimum value that may be set for the console log level.
④ Default Console: the default Log Level of the console.
Each line of text in the log buffer starts with a level mark. The smaller the level value, the higher the importance. The system defines eight message levels,
Level numbers from 0 to 7 are respectively fatal (KERN_EMESG), alert level (KERN_ALERT), critical level (KERN_CRIT ),
Error level (KERN_ERR), alarm level (KERN_WARN), Attention Level (KERN_NOTICE), notification level (KERN_INFO ),
Debugging level (KERN_DEBUG ).
LogLevelCommand
Description: Details of error logs are controlled.
Syntax: LogLevel
Default Value:
LogLevel warn
LogLevel is used to adjust the details of the information recorded in the error log. (See ErrorLog command ). You can select the following levels and sort them in descending order of importance:
Level
Description
Example
Emerg emergency-the system is unavailable. "Child cannot open lockFile. Exiting"
Alert must take immediate action. "GetpwuId: Couldn't deteRmIne user name from uid"
Critical Condition of crit. "Socket: FailEdTo get a socket,ExIting child"
Error. "Premature end of script headers"
Warn warning. "Child process 1234 did not exit, sending another SIGHUP"
Notice is generally important. "Httpd: Caught SIGBUS, attemptingDuMp core in ..."
Info. "Server seems busy, (you may need to INcRease StartServers, or Min/MaxSpareServers )..."
Debug error level information Opening config file ..."
When a specific level is specified, information above all levels is also reported. For example, when LogLevel info is specified, all notice and warn-level information is also recorded.