1NVME-ADMIN-PASSTHR(1)             NVMe Manual            NVME-ADMIN-PASSTHR(1)
2
3
4

NAME

6       nvme-admin-passthru - Submit an arbitrary admin command, return results
7

SYNOPSIS

9       nvme-admin-passthru <device> [--opcode=<opcode> | -o <opcode>]
10                       [--flags=<flags> | -f <flags>] [-rsvd=<rsvd> | -R <rsvd>]
11                       [--namespace-id=<nsid>] [--cdw2=<cdw2>] [--cdw3=<cdw3>]
12                       [--cdw10=<cdw10>] [--cdw11=<cdw11>] [--cdw12=<cdw12>]
13                       [--cdw13=<cdw13>] [--cdw14=<cdw14>] [--cdw15=<cdw15>]
14                       [--data-len=<data-len> | -l <data-len>]
15                       [--metadata-len=<len> | -m <len>]
16                       [--input-file=<file> | -f <file>]
17                       [--read | -r ] [--write | -w]
18                       [--timeout=<to> | -t <to>]
19                       [--show-command | -s]
20                       [--dry-run | -d]
21                       [--raw-binary | -b]
22                       [--prefill=<prefill> | -p <prefill>]
23

DESCRIPTION

25       Submits an arbitrary NVMe admin command and returns the applicable
26       results. This may be the simply the commands result and status, or may
27       also include a buffer if the command returns one. This command does no
28       interpretation of the opcodes or options.
29
30       The <device> parameter is mandatory and may be either the NVMe
31       character device (ex: /dev/nvme0), or a namespace block device (ex:
32       /dev/nvme0n1).
33
34       On success, the returned structure (if applicable) may be returned in
35       one of several ways depending on the option flags; the structure may
36       printed by the program as a hex dump, or may be returned as a raw
37       buffer printed to stdout for another program to parse.
38

OPTIONS

40       -o <opcode>, --opcode=<opcode>
41           The NVMe opcode to send to the device in the command
42
43       -f <flags>, --flags=<flags>
44           The NVMe command flags to send to the device in the command
45
46       -R <rsvd>, --rsvd=<rsvd>
47           The value for the reserved field in the command.
48
49       -n <nsid>, --namespace-id=<nsid>
50           The value for the ns-id in the command.
51
52       --cdw[2-3,10-15]=<cdw>
53           Specifies the command dword value for that specified entry in the
54           command
55
56       -r, --read, -w, --write
57           Used for the data-direction for the command and required for
58           commands sending/receiving data. Don’t use both read and write at
59           the same time.
60
61       -i <file>, --input-file=<file>
62           If the command is a data-out (write) command, use this file to fill
63           the buffer sent to the device. If no file is given, assumed to use
64           STDIN.
65
66       -l <data-len>, --data-len=<data-len>
67           The data length for the buffer used for this command.
68
69       -m <data-len>, --metadata-len=<data-len>
70           The metadata length for the buffer used for this command.
71
72       -s, --show-cmd
73           Print out the command to be sent.
74
75       -d, --dry-run
76           Do not actually send the command. If want to use --dry-run option,
77           --show-cmd option must be set. Otherwise --dry-run optionn will be
78           ignored.
79
80       -b, --raw-binary
81           Print the raw returned buffer to stdout if the command returns a
82           structure.
83
84       -p, --prefill
85           Prefill the buffer with a predetermined byte value. Defaults to 0.
86           This may be useful if the data you are writing is shorter than the
87           required buffer, and you need to pad it with a known value. It may
88           also be useful if you need to confirm if a device is overwriting a
89           buffer for a data-in command.
90

EXAMPLES

92       ·   The following will run the admin command with opcode=6 and cdw10=1,
93           which corresponds to an identify controller command. This example
94           requires the data-len param be 4096, which is the size of the
95           returned structure. The -r option is used because it is a data-in
96           command
97
98               # nvme admin-passthru /dev/nvme0 --opcode=06 --data-len=4096 --cdw10=1 -r
99
100       ·   Or if you want to save that structure to a file:
101
102               # nvme admin-passthru /dev/nvme0 --opcode=06 --data-len=4096 --cdw10=1 -r -b > id_ns.raw
103

NVME

105       Part of the nvme-user suite
106
107
108
109NVMe                              06/05/2018             NVME-ADMIN-PASSTHR(1)
Impressum