为什么需要netconsole
很多时候,很难抓到kernel panic,因为不知道如何复现。 更惨的是,一旦系统重启,系统的log中因为内核异常可能没有记录下有用的信息。这时候netconsole就可以跳出来帮忙了。
比如出现CPU soft lockup的问题,重启之后,从kernel.log中并未找到明显的线索,使用netconsole,让kernel log输出到另一台机器上,这样的话,如果本地不能写磁盘文件,kernel的printk还可以通过网络,将打印的内容记录在另一台机器上。
netconsole是一个内核模块,我们存储的内核将netconsole以module的形式编进了内核,允许将其作为模块加
root@node-191:~# grep NETCONSOLE /boot/config-3.14.35-server CONFIGNETCONSOLE=m CONFIGNETCONSOLE_DYNAMIC=y
Ubuntu的wiki给出了一个很好的页面,介绍netconsole介绍的很详细:https://wiki.ubuntu.com/Kernel/Netconsole
Linux server端运行时配置
Netconsole can be loaded as one of?kernel modules? manually after boot or auto during boot depending on this module config. See?kernel modules?for configuring it to load at boot. For loading manually any time after boot:
shell
# set log level for kernel messages
dmesg -n 7
modprobe conf

9127

被折叠的 条评论
为什么被折叠?



