View Full Version : i killed kern.log

September 30th, 2008, 03:03 AM
I was doing some kernel module development. I did something wrong and my kernel module crashed. After that, kern.log stopped logging.

I use printk(KERN_ALERT "....") to display stuff to kern.log.

How do I get it back without reboot my computer?

I tried restart sysklogd and klogd. klogd seemed touched kern.log, but it won't print my message to the file immediately. It seemed only flush pending kernel messages when I restart it.


September 30th, 2008, 03:26 AM
... but I didn't get the deputy!

Sorry, I couldn't resist.
As for your question, is there a reason why you can't simply reboot?

September 30th, 2008, 04:41 AM
Reboot takes a long time. Not an efficient way to debug. I believe there must be a way to restart daemons. The kernel was still running perfectly.

If there is any other way for me to see the output of printk, that will work, too.

September 30th, 2008, 10:15 AM
I just rechecked that you had already done was I was to propose. No more ideas then :)