From: Tom Z. <za...@us...> - 2006-01-21 23:58:40
|
Tim Cullen writes: > I got the klog example working with kernel 2.6.16-rc with test-mod.ko outputting 123 strings. That all works fine. However when I try using klog_printk from a kernel thread created by kthread_create the output never shows up anywhere. Anyone have ideas whats going on? > Hi, Is the klog daemon running when the kernel thread is calling klog_printk()? If the klog daemon isn't running, nothing gets logged. The reason logging doesn't happen if the daemon isn't running is that the klog handler defined in klog-mod.c doesn't actually call relay_write() unless 'logging' is true, and 'logging' isn't true until the daemon tells it to turn logging on when it starts up, the idea being that you normally wouldn't want to log anything unless there's a reader to drain the channel. Hope that helps, Tom |