This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Logging information through printk


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]