内核的打印函数:
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
printk(打印级别,"格式化输出内容",...);
//打印级别可以省略
//打印级别
在/proc/sys/kernel/目录下有,printk打印级别说明文件
4 4 1 7
第一个字段:打印台控制级别
第二个字段:默认打印级别
第三个字段:最高打印级别
第四个字段:最低打印级别