Systemtap


 
Thread Tools Search this Thread
Top Forums Programming Systemtap
# 1  
Old 11-04-2011
Systemtap

Hi,

I am a newbie to the systemtap. I was wondering is there a way I can write the data to file instead of printing on the screen. This way, I can process the systemtap output periodically using other programs.

Thanks in advance!!
Fidelity
# 2  
Old 11-05-2011
edit a file: put the stap -r '.....' command in file, let's call it mystap.sh stap prints to stdout. So:

Code:
chmod +x mystp.sh  # you only need to execute this one time

./stap.sh > outputfile

Is this what you meant?
Code:
stap -o myoutputfile  ' stap code here ...'

also does what you want, in this case it writes to myoutputfil.
# 3  
Old 11-05-2011
Thanks Jim!

I figured out the -o option yesterday. stap writes to a file that is read by my perl script to process the data. In doing so, sometimes, stap dies immediately after I start my perl script with an error - stap exceeded the threshold.

I gave up :-) and started using pipes. It worked well.

Thanks for your help!!
Fidelity.
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Programming

systemtap returntimeofday_s and some questions

Hi gurus, could you please explain few questions about systemtap. 1st === seems gettimeofday_s() always returns 0 stap -ve 'probe timer.s(4){ printf("%d ", gettimeofday_s()) }' returns 0 0 0 ... also gettimeofday_ms gettimeofday_ns When I am trying to investigate what is going on... (2 Replies)
Discussion started by: wakatana
2 Replies
Login or Register to Ask a Question