Find the answer to your Linux question:
Results 1 to 3 of 3
hi, i am using RH9. i wrote a simple init and cleanup functions that simply printk message of init and exit respectivly. using dmesg is see the printing when i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    3

    printk does not work in init_module (works on cleanup_module though)


    hi,
    i am using RH9.
    i wrote a simple init and cleanup functions that simply printk message of init and exit respectivly.
    using dmesg is see the printing when i remove the module but i can not see the printing when i load it.
    please, enlight me
    thanks.
    merav.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    If you really want to see the messages, you should do:
    Code:
    echo 8 > /proc/sys/kernel/printk
    so that even KERN_DEBUG gets printed to the terminal. Note that this won't print to xterms

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    3
    Quote Originally Posted by lakerdonald
    If you really want to see the messages, you should do:
    Code:
    echo 8 > /proc/sys/kernel/printk
    so that even KERN_DEBUG gets printed to the terminal. Note that this won't print to xterms
    thanks, but i find my problem which was quite stuppid
    i misspelled the word "module" in init_module.
    that is way i only saw my printk's at clean_up module.
    thanks a lot for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •