OS Manuals

/usr/bin/stap

a linux trace/probe tool

From systemtap 5.6-r1 (enterprise-packages), captured 2026-11-08 by running stap --help (exit 0). permalink

Systemtap translator/driver (version 5.6/0.197/0.196, release-5.6)
Copyright (C) 2005-2026 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 3.10 ... 7.3.0-rc3
enabled features: AVAHI BPF PYTHON3 LIBSQLITE3 LIBXML2 NLS NSS MONITOR_LIBS JSON_C LIBDEBUGINFOD METADATA

Usage: stap [options] FILE                    Run script in file.
   or: stap [options] -                       Run script on stdin.
   or: stap [options] -e SCRIPT               Run given script.
   or: stap [options] -l PROBE                List matching probes.
   or: stap [options] -L PROBE                List matching probes and local variables.
   or: stap [options] --dump-probe-types      List available probe types.
   or: stap [options] --dump-probe-aliases    List available probe aliases.
   or: stap [options] --dump-functions        List available functions.

Options (in /tmp/.systemtap/rc and on command line):
   --         end of translator options, script options follow
   -h --help  show help
   -V --version
              show version
   -p NUM     stop after pass NUM 1-5, instead of 5
              (parse, elaborate, translate, compile, run)
   -v         add verbosity to all passes
   --vp {N}+  add per-pass verbosity [00000]
   -k         keep temporary directory
   -u         unoptimized translation
   -w         suppress warnings
   -W         turn warnings into errors
   -g         guru mode
   -P         prologue-searching for function probes
   -b         bulk (percpu file) mode
   -s NUM     buffer size in megabytes, instead of 0
   -I DIR     look in DIR for additional .stp script files, in addition to
              /usr/share/systemtap/tapset
   -D NM=VAL  emit macro definition into generated C code
   -B NM=VAL  pass option to kbuild make
   --debug    build module with extra debugging info
              (CONFIG_DEBUG_INFO=y, -g, -save-temps, run pahole)
   --modinfo NM=VAL
              include a MODULE_INFO(NM,VAL) in the generated C code
   -G VAR=VAL set global variable to value
   -R DIR     look in DIR for runtime, instead of
              /usr/share/systemtap/runtime
   -r DIR     cross-compile to kernel with given build tree; or else
   -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead of
              /lib/modules/6.18.60-r0-gcp-6.18/build
   -a ARCH    cross-compile to given architecture, instead of x86_64
   -m MODULE  set probe module name, instead of
              stap_2
   -o FILE    send script output to file, instead of stdout. This supports
              strftime(3) formats for FILE
   -E SCRIPT  run the SCRIPT in addition to the main script specified
              through -e or a script file
   -c CMD     start the probes, run CMD, and exit when it finishes
   -x PID     sets target() to PID
   -F         run as on-file flight recorder with -o.
              run as on-memory flight recorder without -o.
   -S size[,n] set maximum of the size and the number of files.
   -d OBJECT  add unwind/symbol data for OBJECT file
   --ldd      add unwind/symbol data for referenced user-space objects.
   --all-modules
              add unwind/symbol data for all loaded kernel objects.
   -t         collect probe timing information
   -T TIME    terminate the script after TIME seconds
   -q         generate information on tapset coverage
   --runtime=MODE
              set the pass-5 runtime mode, instead of kernel
   --bpf
              shorthand for --runtime=bpf
   --prologue-searching[=WHEN]
              prologue-searching for function probes
   --privilege=PRIVILEGE_LEVEL
              check the script for constructs not allowed at the given privilege level
   --unprivileged
              equivalent to --privilege=stapusr
   --compatible=VERSION
              suppress incompatible language/tapset changes beyond VERSION,
              instead of 5.6
   --check-version
              displays warnings where a syntax element may be
              version dependent
   --skip-badvars
              substitute zero for bad context $variables
   --suppress-handler-errors
              catch all runtime errors, quietly skip probe handlers
   --semantic-keep-going
              like make -k for pass 2: continue after semantic errors,
              dump a machine-parseable error catalog, still fail if any
   --use-server[=SERVER-SPEC]
              specify systemtap compile-servers
   --list-servers[=PROPERTIES]
              report on the status of the specified compile-servers:
              all,specified,online,trusted,signer,compatible
   --trust-servers[=TRUST-SPEC]
              add/revoke trust of specified compile-servers:
              ssl,signer,all-users,revoke,no-prompt
   --use-server-on-error[=yes/no]
              retry compilation using a compile server upon compilation error
   --remote=HOSTNAME
              run pass 5 on the specified ssh host.
              may be repeated for targeting multiple hosts.
   --remote-prefix
              prefix each line of remote output with a host index.
   --tmpdir=NAME
              specify name of temporary directory to be used.
   --download-debuginfo[=OPTION]
              automatically download debuginfo using ABRT.
              yes,no,ask,<timeout value>
   --dump-probe-types
              show a list of available probe types.
   --sysroot=DIR
              specify sysroot directory where target files (executables,
              libraries, etc.) are located.
   --sysenv=VAR=VALUE
              provide an alternate value for an environment variable
              where the value on a remote system differs.  Path
              variables (e.g. PATH, LD_LIBRARY_PATH) are assumed to be
              relative to the sysroot.
   --suppress-time-limits
              disable -DSTP_OVERLOAD, -DMAXACTION, and -DMAXTRYACTION limits
   --save-uprobes
              save uprobes.ko to current directory if it is built from source
   --target-namespace=PID
              sets the target namespaces pid to PID
   --monitor=INTERVAL
              enables runtime interactive monitoring
   --language-server
              starts a systemtap language server
   --build-as=VALUE
              Set user running passes 1-4
Options (80)
OptionDescriptionSource
-h --helpShow help message.help + man
-V --versionShow version message.help + man
-p NUMstop after pass NUM 1-5, instead of 5 (parse, elaborate, translate, compile, run)help + man
-vIncrease verbosity for all passes.help + man
--vp N}+Increase verbosity on a per-pass basis.help + man
-kKeep the temporary directory after all processing.help + man
-uunoptimized translationhelp + man
-wSuppressed warnings mode.help + man
-WTreat all warnings as errors.help + man
-gGuru mode.help + man
-Pprologue-searching for function probeshelp + man
-bUse bulk mode (percpu files) for kernel-to-user data transfer.help + man
-s NUMUse NUM megabyte buffers for kernel-to-user data transfer per processor.help + man
-I DIRlook in DIR for additional .stp script files, in addition to /usr/share/systemtap/tapsethelp + man
-D NM=VALAdd the given C preprocessor directive to the module Makefile.help + man
-B NM=VALIn kernel-runtime mode, add the given make directive to the kernel module build's make invocation.help + man
--debugBuild the generated kernel module (.ko) or dyninst module (.so) with maximum debugging information for diagnosing code generation problems.help + man
--modinfo NM=VALAdd the name/value pair as a MODULE_INFO macro call to the generated module.help + man
-R DIRlook in DIR for runtime, instead of /usr/share/systemtap/runtimehelp + man
-r DIRcross-compile to kernel with given build tree;help + man
-a ARCHUse a cross-compilation mode for the given target architecture.help + man
-m MODULEUse the given name for the generated kernel object module, instead of a unique randomized name.help + man
-o FILEsend script output to file, instead of stdout.help + man
-E SCRIPTrun the SCRIPT in addition to the main script specified through -e or a script filehelp + man
-c CMDStart the probes, run CMD, and exit when CMD finishes.help + man
-x PIDSets target() to PID.help + man
-FWithout -o option, load module and start probes, then detach from the module leaving the probes running.help + man
-d OBJECTAdd symbol/unwind information for the given module into the kernel object module.help + man
--lddAdd symbol/unwind information for all user-space shared libraries suspected by ldd to be necessary for user-space binaries being probed or listed with the -d option.help + man
--all-modulesEquivalent to specifying "-dkernel" and a "-d" for each kernel module that is currently loaded.help + man
-tCollect timing information on the number of times probe executes and average amount of time spent in each probe-point.help + man
-T TIMEterminate the script after TIME secondshelp + man
-qgenerate information on tapset coveragehelp
--runtime MODEset the pass-5 runtime mode, instead of kernelhelp + man
--bpfShorthand for --runtime=bpf.help + man
--prologue-searching WHENprologue-searching for function probeshelp
--privilege PRIVILEGE_LEVELcheck the script for constructs not allowed at the given privilege levelhelp
--unprivilegedThis option is equivalent to --privilege=stapusr.help + man
--compatible VERSIONSuppress recent script language or tapset changes which are incompatible with given older version of systemtap.help + man
--check-versionThis option is used to check if the active script has any constructs that may be systemtap version specific.help + man
--skip-badvarsIgnore unresolvable or run-time-inaccessible context variables and substitute with 0, without errors.help + man
--suppress-handler-errorscatch all runtime errors, quietly skip probe handlershelp + man
--semantic-keep-goingLike make -k for translator pass 2 (elaboration): when a semantic_error is encountered, record it and continue elaborating sibling probes/functions as far as practical, instead of aborting the rest…help + man
--use-server SERVER-SPECspecify systemtap compile-servershelp
--list-servers PROPERTIESreport on the status of the specified compile-servers: all,specified,online,trusted,signer,compatiblehelp
--trust-servers TRUST-SPECadd/revoke trust of specified compile-servers: ssl,signer,all-users,revoke,no-prompthelp
--use-server-on-error yes/noretry compilation using a compile server upon compilation errorhelp
--remote HOSTNAMESet the execution target to the given host.help + man
--remote-prefixPrefix each line of remote output with "N: ", where N is the index of the remote execution target from which the given line originated.help + man
--tmpdir NAMEspecify name of temporary directory to be used.help
--download-debuginfo OPTIONautomatically download debuginfo using ABRT.help
--dump-probe-typesDumps a list of supported probe types and exits.help + man
--sysroot DIRspecify sysroot directory where target files (executables, libraries, etc.) are located.help + man
--sysenv VAR=VALUEprovide an alternate value for an environment variable where the value on a remote system differs.help + man
--suppress-time-limitsDisable -DSTP_OVERLOAD related options as well as -DMAXACTION and -DMAXTRYLOCK.help + man
--save-uprobesOn machines that require SystemTap to build its own uprobes module (kernels prior to version 3.5), this option instructs SystemTap to also save a copy of the module in the current directory (creating…help + man
--target-namespace PIDsets the target namespaces pid to PIDhelp
--monitor INTERVALEnables an interface to display status information about the module(uptime, module name, invoker uid, memory sizes, global variables, list of probes with their statistics).help + man
--language-serverstarts a systemtap language serverhelp + man
--build-as VALUEExecute passes 1-4 under specified user to increase safety.help + man
-i --interactiveInteractive mode. (in the manual page but not in --help)man
-G NAME=VALUESets the value of global variable NAME to VALUE when staprun is invoked. (in the manual page but not in --help)man
-e SCRIPTRun the given SCRIPT specified on the command line. (in the manual page but not in --help)man
-l PROBEInstead of running a probe script, just list all available probe points matching the given single probe point. (in the manual page but not in --help)man
-L PROBESimilar to "-l", but list matching probe points plus their available context variables. (in the manual page but not in --help)man
--clean-cacheThis option prunes stale entries from the cache directory. (in the manual page but not in --help)man
--disable-cacheThis option disables all use of the cache directory. (in the manual page but not in --help)man
--poison-cacheThis option treats files in the cache directory as invalid. (in the manual page but not in --help)man
--sign-moduleSign the module with a MOK (Machine Owner Key) on UEFI/SecureBoot systems. (in the manual page but not in --help)man
--dump-probe-aliasesDumps a list of all probe aliases found in library files and exits. (in the manual page but not in --help)man
--dump-functionsDumps a list of all the public functions found in library files and exits. (in the manual page but not in --help)man
--rlimit-as NUMSpecify the maximum size of the process's virtual memory (address space), in bytes. (in the manual page but not in --help)man
--rlimit-cpu NUMSpecify the CPU time limit, in seconds. (in the manual page but not in --help)man
--rlimit-nproc NUMSpecify the maximum number of processes that can be created. (in the manual page but not in --help)man
--rlimit-stack NUMSpecify the maximum size of the process stack, in bytes. (in the manual page but not in --help)man
--rlimit-fsize NUMSpecify the maximum size of files that the process may create, in bytes. (in the manual page but not in --help)man
--dyninstShorthand for --runtime=dyninst. (in the manual page but not in --help)man
--target-namespaces PIDAllow for a set of target namespaces to be set based on the namespaces the given PID is in. (in the manual page but not in --help)man
--exampleThis option is used to run example scripts without having to enter the entire path to the script. (in the manual page but not in --help)man
--no-global-var-displayThis option is used to disable the automatic logging of unused global variables at the end of a stap session. (in the manual page but not in --help)man
Exit status (1) from the manual page
0the requested script was processed and executed successfully through the requested pass

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.