1

I have a module running on my Linux machine and can see it using lsmod command. Now I made some changes (added some printk) to this module, recompiled it and got the .ko.

Now I did rmmod to remove this module (some other modules also which are using this module), did insmod xxx.ko and rebooted the system.

Now where do I see the statements added using printk? I tried to see using

dmesg grep | "SPI RW"

But I couldn't find anything. What am I doing wrong here?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Amit Singh Tomar
  • 8,380
  • 27
  • 120
  • 199
  • 1
    You don't need to reboot. Just reload the module. If you reboot, the module will be reloaded from the installed module rather than your modified one. To put your module where it will be loaded at boot time (not recommended until you know it won't crash your system), run `make modules_install` – Peter Aug 27 '13 at 22:14

1 Answers1

3

Try vim /var/log/messages or open messages in a text editor to verify.

For enabling /var/log/messages, edit file /etc/rsyslog.d/50-default.conf

Change the following paragraph:

...
#
# Some "catch-all" log files.
#
#*.=debug;\
#       auth,authpriv.none;\
#       news.none;mail.none     -/var/log/debug
#*.=info;*.=notice;*.=warn;\
#       auth,authpriv.none;\
#       cron,daemon.none;\
#       mail,news.none          -/var/log/messages
....

to the following:

...

#
# Some "catch-all" log files.
#
*.=debug;\
        auth,authpriv.none;\
        news.none;mail.none     -/var/log/debug
*.=info;*.=notice;*.=warn;\
        auth,authpriv.none;\
        cron,daemon.none;\
        mail,news.none          -/var/log/messages
...

and do restart rsyslog.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
EnterKEY
  • 1,180
  • 3
  • 11
  • 25