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: PLEASE HELP regarding System Tap


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


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