Logging information through printk
Martin Hunt
hunt@redhat.com
Mon Jun 4 13:45:00 GMT 2007
On Mon, 2007-06-04 at 13:37 +0200, Alex Iribarren wrote:
> Hi,
>
> I've written a systemtap script that tracks network connections and logs
> data about them. I'm using printk to log the data, but this is causing
> kernel panics when there are a lot of connections.
If you have that much data, do you really want to log to the system log?
How much data are you talking about?
> I see from bugzilla
> (http://sourceware.org/bugzilla/show_bug.cgi?id=3541) that these kind of
> problems are known, but I don't see anything in the way of a workaround.
except for ...
> One solution is to use system("/usr/bin/logger blabla") instead of
> printk, but then I'm afraid I'll be forking too many processes and
> creating lots of extra overhead.
That is possible.
> Can you guys suggest another alternative? Is there a safe way of calling
> printk?
It is safe in most, but not all, places in the kernel. That is why we
don't include it in systemtap.
Martin
More information about the Systemtap
mailing list