这里dmesg [-c] [-n level] [-s bufsize],所以设置1表示日志级别调整成1,这样只有高于KERN_ALERT的日志才能记录,实际上就只有系统不可用(system is unusable)的日志可以输出到控制台。
-n, --console-level level
Set the level at which logging of messages is done to the console. The level is a level number or abbreviation of
the level name. For all supported levels see dmesg --help output.
For example, -n 1 or -n alert prevents all messages, except emergency (panic) messages, from appearing on the con‐
sole. All levels of messages are still written to /proc/kmsg, so syslogd(8) can still be used to control exactly
where kernel messages appear. When the -n option is used, dmesg will not print or clear the kernel ring buffer.