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

# [NAME](#NAME)

function::pstrace - Chain of processes and pids back to [init(1)](/man/enterprise-packages/systemtap/init.1)

# [SYNOPSIS](#SYNOPSIS)

```


    pstrace:string(task:long)
```

# [ARGUMENTS](#ARGUMENTS)

*task*

Pointer to task struct of process

# [DESCRIPTION](#DESCRIPTION)

This function returns a string listing execname and pid for each process starting from *task* back to the process ancestor that [init(1)](/man/enterprise-packages/systemtap/init.1) spawned.

# [SEE ALSO0](#SEE_ALSO0)

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

September 2026 SystemTap Tapset Reference Ver

---

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