1.按照例子保存代码、编译以及安装模块
An introduction to Linux kernel programming - Lesson 4: Writing and running your first kernel module
2.查看输出
1)dmesg
2)cat /var/log/syslog
ubuntu 14.04.3默认运行cat /var/log/messages没有找到文件。
ubuntu - where is /var/log/messages - Unix & Linux Stack Exchange
3.输出结果