FUNCTION::NS\_PID(3stap) Context Functions FUNCTION::NS\_PID(3stap)

# [NAME](#NAME)

function::ns\_pid - Returns the ID of a target process as seen in a pid namespace

# [SYNOPSIS](#SYNOPSIS)

```


    ns_pid:long()
```

# [ARGUMENTS](#ARGUMENTS)

None

# [DESCRIPTION](#DESCRIPTION)

This function returns the ID of a target process as seen in the target pid namespace.

# [SEE ALSO0](#SEE_ALSO0)

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

September 2026 SystemTap Tapset Reference Ver

---

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