0

I want to write a proc file by which i can enable or disable the printk msg printed on the console.Or there will be something like all the printk messages will be printed in my proc file.Then I will be able to read those printk messages in my proc file. How to do this all.Please give me some advise.

Thanks

Baldev Singh

goodies
  • 521
  • 2
  • 6
  • 14
  • How abt `cat proc/kmsg` to read all log messages ? – Narain Apr 15 '13 at 10:57
  • Check if this [link](http://stackoverflow.com/questions/4518420/where-does-output-of-print-in-kernel-go) will be helpful – Narain Apr 15 '13 at 11:01
  • thanks.. This link is helpfull for me.. – goodies Apr 20 '13 at 07:08
  • But my requirement is like this :- I have a large file and i have added lots of printk messages in that file.So at the time of execution of that file,i will get all the printk messages. What i want is if I want to print these messages then enable it otherwise disable it. Because i am writing programs in kernel space,so i want a proc file to do this. – goodies Apr 20 '13 at 12:06

0 Answers0