1NVME-GET-FEATURE(1)               NVMe Manual              NVME-GET-FEATURE(1)
2
3
4

NAME

6       nvme-get-feature - Gets an NVMe feature, returns applicable results
7

SYNOPSIS

9       nvme get-feature <device> [--namespace-id=<nsid> | -n <nsid>]
10                                 [--feature-id=<fid> | -f <fid>] [--cdw11=<cdw11>]
11                                 [--uuid-index=<uuid-index> | -U <uuid_index>]
12                                 [--data-len=<data-len> | -l <data-len>]
13                                 [--sel=<select> | -s <select>]
14                                 [--raw-binary | -b]
15                                 [--human-readable | -H]
16

DESCRIPTION

18       Submits an NVMe Get Feature admin command and returns the applicable
19       results. This may be the feature’s value, or may also include a feature
20       structure if the feature requires it (ex: LBA Range Type).
21
22       The <device> parameter is mandatory and may be either the NVMe
23       character device (ex: /dev/nvme0), or a namespace block device (ex:
24       /dev/nvme0n1).
25
26       On success, the returned feature’s structure (if applicable) may be
27       returned in one of several ways depending on the option flags; the
28       structure may parsed by the program and printed in a readable format if
29       it is a known structure, displayed in hex, or the raw buffer may be
30       printed to stdout for another program to parse.
31

OPTIONS

33       -n <nsid>, --namespace-id=<nsid>
34           Retrieve the feature for the given nsid. This is optional and most
35           features do not use this value.
36
37       -f <fid>, --feature-id=<fid>
38           The feature id to send with the command. Value provided should be
39           in hex.
40
41       -s <select>, --sel=<select>
42           Select (SEL): This field specifies which value of the attributes to
43           return in the provided data:
44
45           ┌───────┬────────────────────────┐
46           │Select │ Description            │
47           ├───────┼────────────────────────┤
48           │0      │ Current                │
49           ├───────┼────────────────────────┤
50           │1      │ Default                │
51           ├───────┼────────────────────────┤
52           │2      │ Saved                  │
53           ├───────┼────────────────────────┤
54           │3      │ Supported capabilities │
55           ├───────┼────────────────────────┤
56           │4–7    │ Reserved               │
57           └───────┴────────────────────────┘
58
59       -U <uuid-index>, --uuid-index=<uuid-index>
60           UUID Index of the feature
61
62       -l <data-len>, --data-len=<data-len>
63           The data length for the buffer returned for this feature. Most
64           known features do not use this value. The exception is LBA Range
65           Type
66
67       --cdw11=<cdw11>
68           The value for command dword 11, if applicable.
69
70       -b, --raw-binary
71           Print the raw feature buffer to stdout if the feature returns a
72           structure.
73
74       -H, --human-readable
75           This option will parse and format many of the bit fields into
76           human-readable formats.
77

EXAMPLES

79       •   Retrieves the feature for Number of Queues, or feature id 7:
80
81               # nvme get-feature /dev/nvme0 -f 7
82
83       •   The following retrieves the feature for the LBA Range Type, which
84           implicitly requires a buffer and will be printed to the screen in
85           human readable format:
86
87               # nvme get-feature /dev/nvme0 -f 3
88
89       •   Retrieves the feature for the some vendor specific feature and
90           specifically requesting a buffer be allocate for this feature,
91           which will be displayed to the user in as a hex dump:
92
93               # nvme get-feature /dev/nvme0 -f 0xc0 -l 512
94
95           Get feature with UUID index
96
97           # nvme get-feature /dev/nvme0 -f 0xc0 -l 512 -U 0x1
98
99       •   The following retrieves the feature for the LBA Range Type, which
100           implicitly requires a buffer and will be saved to a file in its raw
101           format:
102
103               # nvme get-feature /dev/nvme0 -f 3 --raw-binary > lba_range.raw
104
105           It is probably a bad idea to not redirect stdout when using this
106           mode.
107

NVME

109       Part of the nvme-user suite
110
111
112
113NVMe                              04/11/2022               NVME-GET-FEATURE(1)
Impressum