I am working with a pcie device, and corresponding pcie kernel driver. Let's call it pci_driver.c
pci_driver.c is full of printk messages similar to those:
printk(KERN_INFO "pcie_demo: :RD ADDR: 0x%08X\n",(virt_base+bulk_rw.start_addr));
printk(KERN_WARNING"pcie_demo: %s: Init: Device not enabled.\n", gDrvrName);
When I load the driver and run the application, I noticed that /var/log/syslog file size is growing rapidly to 20GB or more. I read in some of the questions that this indicates a problem, but actually my application is working smoothly, so I think that this is not a particular problem; instead, the kernel messages from printk are just stored in syslog file and accumulate very fast (as expected from pcie card).
For now, I clean the memory with this command once in a while:
truncate -s 0 /var/log/syslog
and delete the rotated files: syslog.*
I tried this approach: How do I limit the size of my syslog?
To limit the size of syslog, without much success.. syslog continue to grow without any limit.
What i'm interested in is a sustainable solution that will limit the size of syslog and other log files in /var/log. I prefer an in-system solution rather than a script that is running in the background.
Thanks a lot.