Ubuntu11.04printk (KERN_ALERT, "HELLOWORLD") is not output to the screen. Even if it is replaced with KERN_EMERG, it will not be output to the screen. You can use dmesg | tail-3 to view the output in/var/log/kern. view/etc/rsyslog in log. the last sentence of the log configuration file in the conf file: $ IncludeConfig/etc/rsyslog. d
Ubuntu 11.04
Printk (KERN_ALERT, "HELLOWORLD ")
No output to the screen.
Even if it is replaced with KERN_EMERG, it will not be output to the screen,
Available
Dmesg | tail-3 view output
Output in/var/log/kern. log
View the/etc/rsyslog. conf file to find the log configuration.
The last sentence of the file: $ IncludeConfig/etc/rsyslog. d/*. conf
View files under/etc/rsyslog. d/
50-default.conf File
Auth, authpriv. */var/log/auth. log
*. *; Auth, authpriv. none-/var/log/syslog
# Cron. */var/log/cron. log
# Daemon. *-/var/log/daemon. log
Kern. *-/var/log/kern. log
# Lpr. *-/var/log/lpr. log
Mail. *-/var/log/mail. log
# User. *-/var/log/user. log
The kernel log information is stored in kern. *-/var/log/kern. log.