Re: printk functionality

From: rahul b jain cs student
Date: Mon Jul 12 2004 - 15:50:45 EST


I want to collect data for a graph. For this I need to collect values of a
TCP flow. For this reason, I feel making a change in syslog.conf wont be
sufficient as I dont want the other kernel messages.

I was thinking, if I could add a new option like KERN_INFO, say
KERN_GRAPH, then I could call printk as

printk(KERN_GRAPH "data");

to collect all the required data and KERN_GRAPH would then add all this
data to a seperate file. By kernel defined files, I meant that KERN_INFO
always writes to /var/log/messages etc.

Any suggestions ??

Thanks,
Rahul.

On Mon, 12 Jul 2004, Jesper Juhl wrote:

>
> On Mon, 12 Jul 2004, rahul b jain cs student wrote:
>
> > Hi everyone,
> >
> > I want to add functionality to the printk function such that I can read
> > values off sk_buff and print them to a file specified by me rather than
> > the kernel defined files. So what I want to do is add a new option
> > like KERN_INFO.
> >
> > Does anyone know of a documentation or has ideas on how I can go about
> > doing this ?
> >
>
> I may be misunderstanding what you are trying to do, but it sounds to me
> like you would only need to edit /ets/syslog.conf and tell it to dump
> kernel messages in your own file.. Why change the kernel for this?
>
> --
> Jesper Juhl <juhl-lkml@xxxxxx>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/