This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Logging information through printk
- From: Martin Hunt <hunt at redhat dot com>
- To: Alex Iribarren <alex dot iribarren dot lists at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Mon, 04 Jun 2007 09:45:06 -0400
- Subject: Re: Logging information through printk
- Organization: Red Hat Inc.
- References: <4663F977.70308@gmail.com>
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