Where does output of print in kernel go?

前端 未结 7 902
再見小時候
再見小時候 2020-12-14 08:23

I am debugging a driver for linux (specifically ubuntu server 9.04), and there are several printf statements in the code.

Where can I view the output of these statem

7条回答
  •  爱一瞬间的悲伤
    2020-12-14 09:14

    It depends on the distribution, but many use klogd(8) to get the messages from the kernel and will either log them to a file (sometimes /var/log/dmesg or /var/log/kernel) or to the system log via syslog(3). In the latter case, where the log entries end up will depend on the configuration of syslogd(8).

    One note about the dmesg command: Kernel messages are stored in a circular buffer, so large amounts of output will be overwritten.

提交回复
热议问题