FUNCTION::CMDLINE\_AR(3stap) Context Functions FUNCTION::CMDLINE\_AR(3stap)

# [NAME](#NAME)

function::cmdline\_arg - Fetch a command line argument

# [SYNOPSIS](#SYNOPSIS)

```


    cmdline_arg:string(n:long)
```

# [ARGUMENTS](#ARGUMENTS)

*n*

Argument to get (zero is the program itself)

# [DESCRIPTION](#DESCRIPTION)

Returns argument the requested argument from the current process or the empty string when there are not that many arguments or there is a problem retrieving the argument. Argument zero is traditionally the command itself.

# [SEE ALSO0](#SEE_ALSO0)

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

September 2026 SystemTap Tapset Reference Ver

---

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