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                                 [--data-len=<data-len> | -l <data-len>]
12                                 [--sel=<select> | -s <select>]
13                                 [--raw-binary | -b]
14                                 [--human-readable | -H]
15

DESCRIPTION

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

OPTIONS

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

EXAMPLES

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

NVME

101       Part of the nvme-user suite
102
103
104
105NVMe                              04/24/2020               NVME-GET-FEATURE(1)
Impressum