Run SystemTap scripts
You can run SystemTap scripts from standard input or from a file. Find sample scripts that are distributed with the installation of SystemTap in Sample SystemTap scripts or in the /usr/share/systemtap/examples directory.
Before you begin
- SystemTap and the required kernel packages are installed as described in Installing Systemtap.
- To run SystemTap scripts as a normal user, add the user to the SystemTap groups:
# usermod --append --groups stapdev,stapusr <user_name>
Procedure
Run the SystemTap script:
- From standard input:
# stap -e "probe timer.s(1) {exit()}" - From a file:
# stap <file_name>.stp