This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: PLEASE HELP regarding System Tap
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: Khushboo Goel <kgoel at usc dot edu>
- Cc: systemtap at sources dot redhat dot com
- Date: Mon, 07 Jul 2008 16:58:07 -0400
- Subject: Re: PLEASE HELP regarding System Tap
- References: <358a5c070807071002i28110b08p8c4213e72cc11386@mail.gmail.com> <20080707182856.GA7805@redhat.com> <358a5c070807071330y8ac23c4ica72cce253f15d13@mail.gmail.com>
Hi,
Khushboo Goel wrote:
>>> I am using System Tap for probing kernel function so that I can know
>>> more about packet that are send over network. For this I need to
>>> open a File so that I can save all raw data. I want to save this
>>> data when I probing in the function, continuously.
>> We don't have a C stdio-like facility in systemtap yet. You can make
>> your systemtap probe handler just printf(...), which will come out at
>> the stap(run) command's stdout. You can redirect that as you like
>> (perhaps using the "-o" option). Is that sufficient?
>> ------
>
> When i use -o option, it gives me buffer overflow error, i am
> anyhow not printing anything on screen, i am using an aggregate
> variable to store all information, but i have huge data around 50K
> packets in one run ,which gives me overflow buffer , i also increased
> the stack size but if i increase the number of packets i send over the
> network, it gives me same error.
Could you try to expand your buffer and use bulk transfer mode?
you can specify buffer size for each cpu in MB by -s option(sysemtap
uses only 256KB single buffer without -s option, it's too small
for you), and use bulk transfer mode by -b option.
When you uses bulk mode, you can see raw output data in
stpd_cpu* files. these data are output per cpu, so I think
it's good for your situation.
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com