stapdyn command examples

stapdyn command examples

stapdyn – systemtap dyninst runtime

Here is a very basic example of how to use stapdyn. First, use stap to compile a script. The stap program will report the pathname to the resulting module.

$ stap --dyninst -p4 -e 'probe begin { printf("Hello World!\n"); exit() }'
/home/user/.systemtap/cache/85/stap_8553d83f78c_265.so

Run stapdyn with the pathname to the module as an argument.

$ stapdyn /home/user/.systemtap/cache/85/stap_8553d83f78c_265.so
Hello World!

Leave a Reply

Your email address will not be published. Required fields are marked *