Results 1 to 2 of 2
My printk statements are like printk (KERN_DEBUG, .........)
Because I set printing all to the console. Thus, I get some information from the console.
Meanwhile, after running codes, I checked ...
- 07-16-2005 #1Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
question about the console and log file from Printk result
My printk statements are like printk (KERN_DEBUG, .........)
Because I set printing all to the console. Thus, I get some information from the console.
Meanwhile, after running codes, I checked the /var/log/debug, which includes the
information from the console, however, not everything.
So my questions is
(1) can printk print ALL the statements to console or /var/log/debug? Or if the printing
speed is too fast, the printk only can print PART of them?
Because I use printk debugging the codes, I am afraid I missed some information due to
my bad understanding about printk.
Any advice? Thanks a lot!
- 08-04-2005 #2
To control the error logging value, use /proc/sys/kernel/printk (echo 8 > /proc/sys/kernel/printk to print all messages, counting down from there.)
The number of printk's can be controlled by using the /proc/sys/kernel/printk_ratelimit(_burst) files, and testing it like this:
Code:if (printk_ratelimit()) { printk(KERN_DEBUG "Here's an error message that could flood potentially flood the console!\n"); }


Reply With Quote
