[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] something wrong with printk???
A(nother) way to see printk-messages is
cat /var/log/messages
You can also use tail -n to see just the last n messages.
BTW, I don't have dmsg on my RH 6.2 system. Never did on RH 5.2 either.
Where would I get it?
Norm
----- Original Message -----
From: Philip N Daly <pnd@noao.edu>
To: <rtl@fsmlabs.com>
Sent: Monday, May 07, 2001 12:15 PM
Subject: Re: [rtl] something wrong with printk???
>
> > Hi all,
> > this is probably a simple question but I am not sure where to look for
> > the answer. I have Rubini's Linux Device Drivers book, and I am trying
> > to get his example Hello World module going. I am running Red Hat 6.2
> > kernel 2.2.14-5.0. Here is the code that I use:
> >
> > #define MODULE
> > #include <linux/module.h>
> >
> > int init_module(void) { printk("<1>Hello World\n"); return 0;}
> > void cleanup_module(void) {printk("<1>Goodbye\n");}
> >
> > and this is what I type when I am logged in as root:
> >
> > # gcc -c hello.c
> > # insmod hello.o
> >
> > the message "Hello World" does not get displayed
> >
> > then I type:
> >
> > #rmmod hello
> >
> > the message "Goodbye" does not get displayed.
> >
> > I can tell (I think) that the module is being inserted because if I try
to
> > insert it twice without removing it first, it says a module with that
name
> > already exists.
>
> use the dmesg command to see the output or tail /var/log/messages. Printk
> sends output to the console which you can't see if you're running an
> xterm (for example).
>
>
> +==================================================================+
> Phil Daly, NOAO/AURA, 950 N. Cherry Avenue, Tucson AZ 85719, U S A
> E-mail: pdaly@noao.edu V-mail: (520) 318 8438 Fax: (520) 318 8360
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
>