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

# [NAME](#NAME)

function::pid2task - The task\_struct of the given process identifier

# [SYNOPSIS](#SYNOPSIS)

```


    pid2task:long(pid:long)
```

# [ARGUMENTS](#ARGUMENTS)

*pid*

process identifier

# [DESCRIPTION](#DESCRIPTION)

Return the task struct of the given process id.

# [SEE ALSO0](#SEE_ALSO0)

[*tapset::task*(3stap)](/man/enterprise-packages/systemtap/tapset::task.3stap)

September 2026 SystemTap Tapset Reference Ver

---

Document: function::pid2task(3stap) from systemtap 5.6-r0 (Chainguard OS)
Source: https://sourceware.org/git/systemtap.git
