OS Manuals

function::target(3stap)

function::target - Return the process ID of the target process

FUNCTION::TARGET(3stap) Context Functions FUNCTION::TARGET(3stap)

function::target - Return the process ID of the target process


target:long()

None

This function returns the process ID of the target process. This is useful in conjunction with the -x PID or -c CMD command-line options to stap. An example of its use is to create scripts that filter on a specific process.

-x <pid> target returns the pid specified by -x

-c <command> target returns the pid for the executed command specified by -c

tapset::context(3stap)

September 2026 SystemTap Tapset Reference Ver

systemtap 5.6-r0 · enterprise-packages · ingested 2026-10-02