* printk() not outputting
@ 2009-10-09 18:22 Richard Langly
2009-10-09 22:33 ` Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Richard Langly @ 2009-10-09 18:22 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: printk() not outputting
2009-10-09 18:22 printk() not outputting Richard Langly
@ 2009-10-09 22:33 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2009-10-09 22:33 UTC (permalink / raw)
To: Richard Langly; +Cc: linux-kernel
On 10/09/2009 08:22 PM, Richard Langly wrote:
> So I changed the first value to 8, and I still don't see messages in
> my /var/log/messages file, nor using dmesg.
Well, if there is no other code than you posted, there's missing
module_init(my_init); line.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-09 22:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09 18:22 printk() not outputting Richard Langly
2009-10-09 22:33 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox