NVME-IO-PASSTHRU(1) NVMe Manual NVME-IO-PASSTHRU(1)

# [NAME](#NAME)

nvme-io-passthru - Submit an arbitrary io command, return results

# [SYNOPSIS](#SYNOPSIS)

```
nvme [<global-options>] io-passthru <device>


                        [--opcode=<opcode> | -O <opcode>]


                        [--flags=<flags> | -f <flags>]


                        [-rsvd=<rsvd> | -R <rsvd>]


                        [--namespace-id=<nsid> | -n <nsid>]


                        [--cdw2=<cdw2> | -2 <cdw2>]


                        [--cdw3=<cdw3> | -3 <cdw3>]


                        [--cdw10=<cdw10> | -4 <cdw10>]


                        [--cdw11=<cdw11> | -5 <cdw11>]


                        [--cdw12=<cdw12> | -6 <cdw12>]


                        [--cdw13=<cdw13> | -7 <cdw13>]


                        [--cdw14=<cdw14> | -8 <cdw14>]


                        [--cdw15=<cdw15> | -9 <cdw15>]


                        [--data-len=<data-len> | -l <data-len>]


                        [--metadata-len=<len> | -m <len>]


                        [--read | -r] [--write | -w]


                        [--input-file=<file> | -i <file>]


                        [--metadata=<file> | -M <file>]


                        [--show-command | -s]


                        [--dry-run | -d] [--raw-binary | -b]


                        [--prefill=<prefill> | -p <prefill>]


                        [--latency | -T]
```

# [DESCRIPTION](#DESCRIPTION)

Submits an arbitrary NVMe IO command and returns the applicable results. This may be the simply the command’s result and status, or may also include a buffer if the command returns one. This command does no interpretation of the opcodes or options.

The &lt;device&gt; parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).

On success, the returned structure (if applicable) may be returned in one of several ways depending on the option flags; the structure may printed by the program as a hex dump, or may be returned as a raw buffer printed to stdout for another program to parse.

# [OPTIONS](#OPTIONS)

-O &lt;opcode&gt;, --opcode=&lt;opcode&gt;

The NVMe opcode to send to the device in the command Required argument as this param is mandatory.

-f &lt;flags&gt;, --flags=&lt;flags&gt;

The NVMe command flags to send to the device in the command

-R &lt;rsvd&gt;, --rsvd=&lt;rsvd&gt;

The value for the reserved field in the command.

-n &lt;nsid&gt;, --namespace-id=&lt;nsid&gt;

The value for the ns-id in the command. Defaults to *0*.

-\[2-9] &lt;cdw&gt;, --cdw\[2-3,10-15]=&lt;cdw&gt;

Specifies the command dword value for that specified entry in the command

-r, --read, -w, --write

Used for the data-direction for the command and required for commands sending/receiving data. Don’t use both read and write at the same time.

-i &lt;file&gt;, --input-file=&lt;file&gt;

If the command is a data-out (write) command, use this file to fill the buffer sent to the device. If no file is given, assumed to use STDIN. If the command is a data-in (read) command, the data returned from the device will be saved here.

-M &lt;file&gt;, --metadata=&lt;file&gt;

If the command is a data-out (write) command, use this file to fill the metadata buffer sent to the device. If no file is given, assumed to use STDIN. If the command is a data-in (read) command, the metadata returned from the device will be saved here.

-l &lt;data-len&gt;, --data-len=&lt;data-len&gt;

The data length for the buffer used for this command.

-m &lt;data-len&gt;, --metadata-len=&lt;data-len&gt;

The metadata length for the buffer used for this command.

-s, --show-cmd

Print out the command to be sent.

-d, --dry-run

Do not actually send the command. If want to use --dry-run option, --show-cmd option *must* be set. Otherwise --dry-run option will be *ignored*.

-b, --raw-binary

Print the raw returned buffer to stdout if the command returns data or a structure.

-p &lt;prefill&gt;, --prefill &lt;prefill&gt;

Prefill the buffer with a predetermined byte value. Defaults to 0. This may be useful if the data you are writing is shorter than the required buffer, and you need to pad it with a known value. It may also be useful if you need to confirm if a device is overwriting a buffer on a data-in command.

-T, --latency

Print out the latency the IOCTL took (in us).

# [GLOBAL OPTIONS](#GLOBAL_OPTIONS)

The following options are defined at the top-level nvme command and are available to this subcommand:

--dry-run

Print the command that would be executed, but do not actually execute it.

--no-ioctl-probing

Disable probing for 64-bit IOCTL support.

--no-retries

Disable retry logic on transient errors.

-o &lt;fmt&gt;, --output-format=&lt;fmt&gt;

Set the reporting format to *normal*, *tabular, 'json*, or *binary*. Only one output format may be used at a time.

--output-format-version=&lt;version&gt;

Select the output format version. Version *1* uses the original field naming, while version *2* (default) provides more consistent and script-friendly field names.

--timeout=&lt;ms&gt;

Set the timeout for the command in milliseconds.

-v, --verbose

Increase the level of detail in the output. May be specified multiple times to further increase verbosity.

These options can also be set as machine-wide defaults in [nvme-cli.conf(5)](/man/os/nvme-cli/nvme-cli.conf.5). A command-line flag always overrides the file.

# [EXAMPLES](#EXAMPLES)

nvme io-passthru /dev/nvme0n1 --opcode=2 --namespace-id=1 --data-len=4096 --read --cdw10=0 --cdw11=0 --cdw12=0x70000 --raw-binary

# [NVME](#NVME)

Part of the nvme-user suite

09/18/2026 NVMe

---

Document: nvme-io-passthru(1) from nvme-cli 3.1-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
