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

# [NAME](#NAME)

function::cmdline\_args - Fetch command line arguments from current process

# [SYNOPSIS](#SYNOPSIS)

```


    cmdline_args:string(n:long,m:long,delim:string)
```

# [ARGUMENTS](#ARGUMENTS)

*n*

First argument to get (zero is normally the program itself)

*m*

Last argument to get (or minus one for all arguments after n)

*delim*

String to use to separate arguments when more than one.

# [DESCRIPTION](#DESCRIPTION)

Returns arguments from the current process starting with argument number n, up to argument m. If there are less than n arguments, or the arguments cannot be retrieved from the current process, the empty string is returned. If m is smaller than n then all arguments starting from argument n are returned. 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_args(3stap) from systemtap 5.6-r1 (Chainguard OS)
Source: https://sourceware.org/git/systemtap.git
