u can do this within your module. Give u a link for reference. http://www.linuxjournal.com/article/8110 And u also can refer to the mechanism like dmesg BRs Lin 2009/9/14 Leonidas . <leonidas137@xxxxxxxxx>: > > > Hi List > > I have written a kernel module which implements a char device. An userspace > app > is supposed to get data from my module and then dump it into a file for > further processing. > > The kind of data which kernel module is going to pass to userspace is going > to be a 4K buffer, > and the data traffic is not going to be really heavy, meaning may be a 4K > buffer every 1 min or so. > I am not very sure though, but certainly not heavy traffic the way they > describe for network traffic etc. > > And this data needs to be logged to a file either from kernel or userspace > and an userspace all will work > on that data. This data needs to be logged as soon as it arrives meaning, I > might not be able to write it to > /proc since from module I can update /proc only when user actually accesses > it. This data needs to be > static in nature, meaning I get one error and I write it to a file somehow > and user can see it anytime. > > I hope I have described the situation clearly. I have explored some > mechanism like ioctls, mmaping the > kernel buffer etc but all these would require the user module to poll or > notified somehow by kernel that > the data is available. I dont want the user module to poll. > > > -Leo. > > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ