messages printed lots of times
hi all, i am putting a printk() on link_path_walk() kernel function ( the pathname resolution function). i access that printk() only at some special condition (like if pathname passed to link_path_walk() matches with some name) . but when it gets hit like when i pass pathname via unlink(2) , lots of messages are written to dmesg ( or /var/log/messages) . i could not understand why these lots of messages are being written ? (i was hoping for only one message) i check for the match with some perticular filename just for a trial. thanks in advance -- ........................ *MOHIT VERMA*
i am putting a printk() on link_path_walk() kernel function ( the pathname resolution function). i access that printk() only at some special condition (like if pathname passed to link_path_walk() matches with some name) . but when it gets hit like when i pass pathname via unlink(2) , lots of messages are written to dmesg ( or /var/log/messages) . i could not understand why these lots of messages are being written ? (i was hoping for only one message)
Try to printout the name of the process on behalf of which the kernel runs link_path_walk using current->comm. Then filter out the printks done by your application. thanks, Daniel.
On Sat, Feb 26, 2011 at 5:14 PM, Daniel Baluta <daniel.baluta@gmail.com>wrote:
i am putting a printk() on link_path_walk() kernel function ( the pathname resolution function). i access that printk() only at some special condition (like if pathname passed to link_path_walk() matches with some name) . but when it gets hit like when i pass pathname via unlink(2) , lots of messages are written to dmesg ( or /var/log/messages) . i could not understand why these lots of messages are being written ? (i was hoping for only one message)
Try to printout the name of the process on behalf of which the kernel runs link_path_walk using current->comm.
Then filter out the printks done by your application.
i have checked with timestamps . and all the repeated lines show the same timestemps. and yes, daniel, the program name is also same each time. but why are these lines repeated in /var/log/messages file ? :)
-- ........................ *MOHIT VERMA*
participants (2)
-
Daniel Baluta -
mohit verma