1NDCTL-LIST(1) ndctl Manual NDCTL-LIST(1)
2
3
4
6 ndctl-list - dump the platform nvdimm device topology and attributes in
7 json
8
10 ndctl list [<options>]
11
12 Walk all the nvdimm buses in the system and list all attached devices
13 along with some of their major attributes.
14
15 Options can be specified to limit the output to devices of a certain
16 class. Where the classes are buses, dimms, regions, and namespaces. By
17 default, ndctl list with no options is equivalent to:
18
19 ndctl list --namespaces --bus=all --region=all
20
22 .ft C
23 # ndctl list --buses --namespaces
24
25 {
26 "provider":"nfit_test.1",
27 "dev":"ndbus2",
28 "namespaces":[
29 {
30 "dev":"namespace9.0",
31 "mode":"raw",
32 "size":33554432,
33 "blockdev":"pmem9"
34 }
35 ]
36 }
37 {
38 "provider":"nfit_test.0",
39 "dev":"ndbus1"
40 }
41 {
42 "provider":"e820",
43 "dev":"ndbus0",
44 "namespaces":[
45 {
46 "dev":"namespace0.0",
47 "mode":"fsdax",
48 "size":8589934592,
49 "blockdev":"pmem0"
50 }
51 ]
52 }
53 .ft
54
55
57 -r, --region=
58 A regionX device name, or a region id number. Restrict the
59 operation to the specified region(s). The keyword all can be
60 specified to indicate the lack of any restriction, however this is
61 the same as not supplying a --region option at all.
62
63 -b, --bus=
64 A bus id number, or a provider string (e.g. "ACPI.NFIT"). Restrict
65 the operation to the specified bus(es). The keyword all can be
66 specified to indicate the lack of any restriction, however this is
67 the same as not supplying a --bus option at all.
68
69 -d, --dimm=
70 An nmemX device name, or dimm id number. The dimm id number here is
71 X in nmemX. Filter listing by devices that reference the given
72 dimm. For example to see all namespaces comprised of storage
73 capacity on nmem0:
74
75
76 .ft C
77 # ndctl list --dimm=nmem0 --namespaces
78 .ft
79
80
81 -n, --namespace=
82 An namespaceX.Y device name, or namespace region plus id tuple X.Y.
83 Limit the namespace list to the single identified device if
84 present.
85
86 -t, --type=
87 Filter listing by region type (pmem or blk)
88
89 -m, --mode=
90 Filter listing by the mode (raw, fsdax, sector or devdax) of the
91 namespace(s).
92
93 -U, --numa-node=
94 Filter listing by numa node
95
96 -B, --buses
97 Include bus info in the listing
98
99 -D, --dimms
100 Include dimm info in the listing
101
102 {
103 "dev":"nmem0",
104 "id":"cdab-0a-07e0-ffffffff",
105 "handle":0,
106 "phys_id":0,
107 "security:":"disabled"
108 }
109
110 -H, --health
111 Include dimm health info in the listing. For example:
112
113 {
114 "dev":"nmem0",
115 "health":{
116 "health_state":"non-critical",
117 "temperature_celsius":23,
118 "spares_percentage":75,
119 "alarm_temperature":true,
120 "alarm_spares":true,
121 "temperature_threshold":40,
122 "spares_threshold":5,
123 "life_used_percentage":5,
124 "shutdown_state":"clean"
125 }
126 }
127
128 -F, --firmware
129 Include firmware info in the listing, including the state and
130 capability of runtime firmware activation:
131
132
133 .ft C
134 # ndctl list -BDF
135 [
136 {
137 "provider":"nfit_test.0",
138 "dev":"ndbus2",
139 "scrub_state":"idle",
140 "firmware":{
141 "activate_method":"suspend",
142 "activate_state":"idle"
143 },
144 "dimms":[
145 {
146 "dev":"nmem1",
147 "id":"cdab-0a-07e0-ffffffff",
148 "handle":0,
149 "phys_id":0,
150 "security":"disabled",
151 "firmware":{
152 "current_version":0,
153 "can_update":true
154 }
155 },
156 ...
157 ]
158 .ft
159
160
161 -X, --device-dax
162 Include device-dax ("daxregion") details when a namespace is in
163 "devdax" mode.
164
165 {
166 "dev":"namespace0.0",
167 "mode":"devdax",
168 "size":4225761280,
169 "uuid":"18ae1bbb-bb62-4efc-86df-4a5caacb5dcc",
170 "daxregion":{
171 "id":0,
172 "size":4225761280,
173 "align":2097152,
174 "devices":[
175 {
176 "chardev":"dax0.0",
177 "size":4225761280
178 }
179 ]
180 }
181 }
182
183 -R, --regions
184 Include region info in the listing
185
186 -N, --namespaces
187 Include namespace info in the listing. Namespace info is listed by
188 default if no other options are specified to the command.
189
190 -i, --idle
191 Include idle (not enabled) devices in the listing
192
193 -c, --configured
194 Include configured devices (non-zero sized namespaces) regardless
195 of whether they are enabled, or not. Other devices besides
196 namespaces are always considered "configured".
197
198 -C, --capabilities
199 Include region capabilities in the listing, i.e. supported
200 namespace modes and variable properties like sector sizes and
201 alignments.
202
203 -M, --media-errors
204 Include media errors (badblocks) in the listing. Note that the
205 badblock_count property is included in the listing by default when
206 the count is non-zero, otherwise it is hidden. Also, if the
207 namespace is in sector mode the badblocks listing is not included
208 and badblock_count property may include blocks that are located in
209 metadata, or unused capacity in the namespace. Convert a sector
210 namespace into raw mode to list precise badblocks offsets.
211
212 {
213 "dev":"namespace7.0",
214 "mode":"raw",
215 "size":33554432,
216 "blockdev":"pmem7",
217 "badblock_count":17,
218 "badblocks":[
219 {
220 "offset":4,
221 "length":1
222 },
223 {
224 "offset":32768,
225 "length":8
226 },
227 {
228 "offset":65528,
229 "length":8
230 }
231 ]
232 }
233
234 -v, --verbose
235 Increase verbosity of the output. This can be specified multiple
236 times to be even more verbose on the informational and
237 miscellaneous output, and can be used to override omitted flags for
238 showing specific information.
239
240
241 • -v In addition to the enabled namespaces default output, show
242 the numa_node, raw_uuid, and bad block media errors.
243
244 • -vv Everything -v provides, plus automatically enable --dimms,
245 --buses, and --regions.
246
247 • -vvv Everything -vv provides, plus --health, --capabilities,
248 --idle, and --firmware. :: The verbosity can also be scoped by
249 the object type. For example to just list regions with
250 capabilities and media error info.
251
252
253 .ft C
254 # ndctl list -Ru -vvv -r 0
255 {
256 "dev":"region0",
257 "size":"4.00 GiB (4.29 GB)",
258 "available_size":0,
259 "max_available_extent":0,
260 "type":"pmem",
261 "numa_node":0,
262 "target_node":2,
263 "capabilities":[
264 {
265 "mode":"sector",
266 "sector_sizes":[
267 512,
268 520,
269 528,
270 4096,
271 4104,
272 4160,
273 4224
274 ]
275 },
276 {
277 "mode":"fsdax",
278 "alignments":[
279 4096,
280 2097152,
281 1073741824
282 ]
283 },
284 {
285 "mode":"devdax",
286 "alignments":[
287 4096,
288 2097152,
289 1073741824
290 ]
291 }
292 ],
293 "persistence_domain":"unknown"
294 }
295 .ft
296
297
298 -u, --human
299 Format numbers representing storage sizes, or offsets as human
300 readable strings with units instead of the default machine-friendly
301 raw-integer data. Convert other numeric fields into hexadecimal
302 strings.
303
304
305 .ft C
306 # ndctl list --region=7
307 {
308 "dev":"region7",
309 "size":67108864,
310 "available_size":67108864,
311 "type":"pmem",
312 "iset_id":-6382611090938810793,
313 "badblock_count":8
314 }
315 .ft
316
317
318
319 .ft C
320 # ndctl list --human --region=7
321 {
322 "dev":"region7",
323 "size":"64.00 MiB (67.11 MB)",
324 "available_size":"64.00 MiB (67.11 MB)",
325 "type":"pmem",
326 "iset_id":"0xa76c6907811fae57",
327 "badblock_count":8
328 }
329 .ft
330
331
333 NDCTL_LIST_LINT
334 A bug in the "ndctl list" output needs to be fixed with care for
335 other tooling that may have developed a dependency on the buggy
336 behavior. The NDCTL_LIST_LINT variable is an opt-in to apply fixes,
337 and not regress previously shipped behavior by default. This
338 environment variable applies the following fixups:
339
340 • Fix "ndctl list -Rv" to only show region objects and not
341 include namespace objects. ::
342
344 Copyright © 2016 - 2020, Intel Corporation. License GPLv2: GNU GPL
345 version 2 http://gnu.org/licenses/gpl.html. This is free software: you
346 are free to change and redistribute it. There is NO WARRANTY, to the
347 extent permitted by law.
348
350 ndctl-create-namespace(1)
351
352
353
354ndctl 71.1 07/22/2021 NDCTL-LIST(1)