---
name: "function::target"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::target"
---

# function::target(3stap)

Return the process ID of the target process

## NAME

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

## SYNOPSIS

```
    target:long()
```

## ARGUMENTS

None

## DESCRIPTION

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

## SEE ALSO0

[*tapset::context*(3stap)](/tapset::context/3stap.md)
