Lawrence Stewart <[EMAIL PROTECTED]> writes: > I'm in the process of writing a kernel module to instrument some parts > of the network stack in FreeBSD 6.2. Everything works perfectly, > except that writing the logging info to syslog using printf is too > inefficient for this particular task. Given that log messages need to > be generated for each packet entering/leaving the network stack, my > testing thus far has showed that syslog groans under the load and uses > far too much CPU time. > > So, I'm looking for a way to manually open up a file from within > kernel space and dump characters into it.
Look at the ktrace code. Note that it opens the file in userland and passes it down to the kernel. You may want to consider a similar mechanism. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"