From: Tim C. <tim...@ya...> - 2006-01-22 03:38:57
|
Hi Tom Guess I forgot to mention that the klog daemon is running. Everything is the same in as the klog example from the relay-apps tarball. The only difference is that instead of using test-mod.ko to generate log data, I'm using my own module that calls klog_printk from a kernel thread started by kthread_create. On a maybe-related, maybe-not-related note I'm having the same problem with output from printk even though I've done a "echo 8 > /proc/sys/kernel/printk" as root before hand. very confusing... tim Tom Zanussi <za...@us...> wrote: 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 --------------------------------- What are the most popular cars? Find out at Yahoo! Autos |