printk() not outputting
From: Richard Langly
Date: Fri Oct 09 2009 - 14:23:34 EST
I've got a problem making it hard for me to debug. For some reason, my
printk()'s aren't putting anything out to my /var/log/messages file. I
am running X so, as I understand it, messages won't appear in the
terminals where I insmod the module. But they should appear in
/var/log/messages.
If I load my test module, I do get a message from /var/log/messages saying ....
Oct 3 14:50:04 Tux sudo: whisper : TTY=pts/12 ;
PWD=/home/whisper/test-mod/kernel/net/tm ; USER=root ;
COMMAND=/sbin/insmod mymod.ko
My problem appears as simple as this.
static int __init my_init(void) {
printk(KERN_CRIT "my_init ...\n");
// ...
return 0;
}
static void __exit my_exit(void) {
printk(KERN_INFO "my_exit ...\n");
}
Also, the values in my /proc/sys/kernel/printk file are:
8 4 1 7
So I changed the first value to 8, and I still don't see messages in
my /var/log/messages file, nor using dmesg.
When I load the module, it's just this ...
make
sudo depmod -a
sudo insmod ./mymod.ko
And I don't see anything in my syslog-ng.conf that would prevent this.
Any help much appreciated.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/