Scripts & Tools
The goal of this page is to encourage the development and sharing of a wide variety of SystemTap scripts. What should be included? Nothing is too big or too small for consideration. Please document completed scripts in the Scripts section below and suggestions in Script Ideas. Also see the WarStories page for additional scripts.
NOTE These scripts may be incomplete or obsolete. The suite of examples packaged with systemtap releases undergoes automatic testing.
Scripts (by category)
iotime.stp: Print the time spent in the read() and write() system calls when a process closes each file.
sigkill.stp :Monitor processes that receives a SIGKILL signal.
sigmon.stp: Monitor when a specific process ID receives a specific signal.
sleeptime.stp: Print the time spent in the nanosleep() and compat_nanosleep() systemcalls. This can help find which processes are waking based on time rather than some real event that needs to be handled.
traceio.stp :Another I/O activity by process name example
set_task_state.stp :Reliable way to make a process enter specified task state
proc_transition_by_pid.stp :Trace state transition of specified process
dumpstack.stp : Dump kernel stack for specified process that isn't in running
Script Ideas (by category)
- Scripts that utilize the audit hooks
- Scripts that emulate the audit subsystem functionality
- Scripts that utilize blocktrace hooks
- List open files: lsof command equivalent
- Memory leak detection: track memory subsystem activity to detect who may be leaking memory
Better application memory analysis. See How much memory am I really using?
- SCTP - Stream Control Transmission Protocol
- File creat()s by process name
- File descriptor usage by process name
- File opens by process name
- File IO activity by filename and process name
- List new processes as they are created
- Process creation rate
- Bytes read by process name
- Application startup analysis: a breakdown of what's happening when an application starts up. For example, why does it take Firefox so long to start?
- Implement BSD process accounting on top of systemtap
Power usage analysis. See powertop.
- CPU usage by UID and GID
- Network usage by UID and GID
Distribution framework for SystemTap scripts