]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/nvmecontrol/nvmecontrol.8
nvmecontrol: Preliminary namespace documentation
[FreeBSD/FreeBSD.git] / sbin / nvmecontrol / nvmecontrol.8
1 .\"
2 .\" Copyright (c) 2020 Warner Losh <imp@FreeBSD.org>
3 .\" Copyright (c) 2018-2019 Alexander Motin <mav@FreeBSD.org>
4 .\" Copyright (c) 2012 Intel Corporation
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions, and the following disclaimer,
12 .\"    without modification.
13 .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
14 .\"    substantially similar to the "NO WARRANTY" disclaimer below
15 .\"    ("Disclaimer") and any redistribution must be conditioned upon
16 .\"    including a substantially similar Disclaimer requirement for further
17 .\"    binary redistribution.
18 .\"
19 .\" NO WARRANTY
20 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
23 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 .\" POSSIBILITY OF SUCH DAMAGES.
31 .\"
32 .\" nvmecontrol man page.
33 .\"
34 .\" Author: Jim Harris <jimharris@FreeBSD.org>
35 .\"
36 .Dd April 17, 2024
37 .Dt NVMECONTROL 8
38 .Os
39 .Sh NAME
40 .Nm nvmecontrol
41 .Nd NVM Express control utility
42 .Sh SYNOPSIS
43 .Nm
44 .Ic devlist
45 .Op Fl h
46 .Nm
47 .Ic identify
48 .Op Fl v
49 .Op Fl x
50 .Op Fl n Ar nsid
51 .Aq Ar device-id | Ar namespace-id
52 .Nm
53 .Ic perftest
54 .Aq Fl n Ar num_threads
55 .Aq Fl o Ar read|write
56 .Op Fl p
57 .Aq Fl s Ar size_in_bytes
58 .Aq Fl t Ar time_in_sec
59 .Aq Ar namespace-id
60 .Nm
61 .Ic reset
62 .Aq Ar device-id
63 .Nm
64 .Ic logpage
65 .Aq Fl p Ar page_id
66 .Op Fl x
67 .Op Fl v Ar vendor-string
68 .Op Fl b
69 .Op Fl f Ar LSP
70 .Op Fl i Ar LSI
71 .Op Fl r
72 .Aq Ar device-id | Ar namespace-id
73 .Nm
74 .Ic ns active
75 .Aq Ar device-id
76 .Nm
77 .Ic ns allocated
78 .Aq Ar device-id
79 .Nm
80 .Ic ns attach
81 .Aq Fl n Ar nsid
82 .Aq Fl c Ar cntid
83 .Aq Ar device-id
84 .Nm
85 .Ic ns attached
86 .Aq Fl n Ar nsid
87 .Aq Ar device-id
88 .Nm
89 .Ic ns controllers
90 .Aq Ar device-id
91 .Nm
92 .Ic ns create
93 .Aq Fl s Ar nsze
94 .Op Fl c Ar ncap
95 .Op Fl f Ar lbaf
96 .Op Fl m Ar mset
97 .Op Fl n Ar nmic
98 .Op Fl p Ar pi
99 .Op Fl l Ar pil
100 .Op Fl L Ar flbas
101 .Op Fl d Ar dps
102 .Aq Ar device-id
103 .Nm
104 .Ic ns delete
105 .Aq Fl n Ar nsid
106 .Aq Ar device-id
107 .Nm
108 .Ic ns detach
109 .Aq Fl n Ar nsid
110 .Aq Fl c Ar cntid
111 .Aq Ar device-id
112 .Nm
113 .Ic ns identify
114 .Op Fl v
115 .Op Fl x
116 .Aq Fl n Ar nsid
117 .Aq Ar device-id
118 .Nm
119 .Ic nsid
120 .Aq Ar device-id | Ar namespace-id
121 .Nm
122 .Ic resv acquire
123 .Aq Fl c Ar crkey
124 .Op Fl p Ar prkey
125 .Aq Fl t Ar rtype
126 .Aq Fl a Ar racqa
127 .Aq Ar namespace-id
128 .Nm
129 .Ic resv register
130 .Op Fl i
131 .Op Fl c Ar crkey
132 .Aq Fl k Ar nrkey
133 .Aq Fl r Ar rrega
134 .Op Fl p Ar cptpl
135 .Aq Ar namespace-id
136 .Nm
137 .Ic resv release
138 .Aq Fl c Ar crkey
139 .Aq Fl t Ar rtype
140 .Aq Fl a Ar rrela
141 .Aq Ar namespace-id
142 .Nm
143 .Ic resv report
144 .Op Fl e
145 .Op Fl v
146 .Op Fl x
147 .Aq Ar namespace-id
148 .Nm
149 .Ic firmware
150 .Op Fl s Ar slot
151 .Op Fl f Ar path_to_firmware
152 .Op Fl a
153 .Aq Ar device-id
154 .Nm
155 .Ic format
156 .Op Fl f Ar fmt
157 .Op Fl m Ar mset
158 .Op Fl p Ar pi
159 .Op Fl l Ar pil
160 .Op Fl E
161 .Op Fl C
162 .Aq Ar device-id | Ar namespace-id
163 .Nm
164 .Ic sanitize
165 .Aq Fl a Ar sanact
166 .Op Fl c Ar owpass
167 .Op Fl d
168 .Op Fl p Ar ovrpat
169 .Op Fl r
170 .Op Fl I
171 .Op Fl U
172 .Aq Ar device-id
173 .Nm
174 .Ic power
175 .Op Fl l
176 .Op Fl p power_state
177 .Op Fl w workload_hint
178 .Nm
179 .Ic selftest
180 .Aq Fl c Ar code
181 .Aq Ar device-id | Ar namespace-id
182 .Nm
183 .Ic wdc cap-diag
184 .Op Fl o path_template
185 .Aq Ar device-id
186 .Nm
187 .Ic wdc drive-log
188 .Op Fl o path_template
189 .Aq Ar device-id
190 .Nm
191 .Ic wdc get-crash-dump
192 .Op Fl o path_template
193 .Aq Ar device-id
194 .\" .Nm
195 .\" .Ic wdc purge
196 .\" .Aq device-id
197 .\" .Nm
198 .\" .Ic wdc purge-monitor
199 .\" .Aq device-id
200 .Nm
201 .Ic admin-passthru
202 .Op args
203 .Aq Ar device-id
204 .Nm
205 .Ic io-passthru
206 .Op args
207 .Aq Ar namespace-id
208 .Sh DESCRIPTION
209 NVM Express (NVMe) is a storage protocol standard, for SSDs and other
210 high-speed storage devices over PCI Express.
211 .Ss devlist
212 List all NVMe controllers and namespaces along with their device nodes.
213 With the
214 .Fl h
215 argument, use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte
216 and Pebibyte (based on powers of 1024) when showing the disk space.
217 By default, uses Mebibyte.
218 .Ss identify
219 The identify commands reports information from the drive's
220 .Dv IDENTIFY_CONTROLLER
221 if a
222 .Ar device-id
223 is specified.
224 It reports
225 .Dv IDENTIFY_NAMESPACE
226 data if a
227 .Ar namespace-id
228 is specified.
229 When used with disk names, the
230 .Dv IDENTIFY_NAMESPACE
231 data is reported, unless the namespace
232 .Ar nsid
233 is overridden with the
234 .Fl n
235 flag.
236 Then that namespace's data is reported, if it exists.
237 The command accepts the following parameters:
238 .Bl -tag -width 6n
239 .It Fl n
240 The namespace
241 .Aq nsid
242 to use instead of the namespace associated with the device.
243 A
244 .Ar nsid
245 of
246 .Dq 0
247 is used to retrieve the
248 .Dv IDENTIFY_CONTROLLER
249 data associated with that drive.
250 .El
251 .Ss logpage
252 The logpage command knows how to print log pages of various types.
253 It also knows about vendor specific log pages from hgst/wdc, samsung and intel.
254 Note that some vendors use the same log page numbers for different data.
255 .Pp
256 .Bl -tag -compact -width "Page 0x00"
257 .It Dv Page 0x01
258 Drive Error Log
259 .It Dv Page 0x02
260 Health/SMART Data
261 .It Dv Page 0x03
262 Firmware Information
263 .It Dv Page 0x04
264 Changed Namespace List
265 .It Dv Page 0x05
266 Commands Supported and Effects
267 .It Dv Page 0x06
268 Device Self-test
269 .It Dv Page 0x80
270 Reservation Notification
271 .It Dv Page 0x81
272 Sanitize Status
273 .It Dv Page 0xc1
274 Advanced SMART information (WDC/HGST)
275 .It Dv Page 0xc1
276 Read latency stats (Intel)
277 .It Dv Page 0xc2
278 Wite latency stats (Intel)
279 .It Dv Page 0xc5
280 Temperature stats (Intel)
281 .It Dv Page 0xca
282 Advanced SMART information (Intel)
283 .It Dv Page 0xca
284 Extended SMART information (Samsung)
285 .El
286 .Pp
287 Specifying
288 .Fl v
289 .Ic help
290 will list all valid vendors and pages.
291 .Fl x
292 will print the page as hex.
293 .Fl b
294 will print the binary data for the page.
295 .Fl s
296 will set Log Specific Field.
297 .Fl i
298 will set Log Specific Identifier.
299 .Fl r
300 will set Retain Asynchronous Event.
301 .Ss ns
302 Various namespace management commands.
303 If namespace management is supported by device, allow list, create and delete
304 namespaces, list, attach and detach controllers to namespaces.
305 Each NVM device consists of one or more NVM subsystems.
306 Each NVM subsystem has one or more NVM ports.
307 Each NVM port is attached to one or more NVM controllers (though typically 1).
308 Each NVM controller is attached to one or more namespaces.
309 .Pp
310 After a namespace is created, it is considered
311 .Dq allocated .
312 All namespaces that have not been created are unallocated.
313 An allocated namespace may be active or inactive.
314 An active namespace is attached to the controller and may be interacted with.
315 A namespace can move from active to inactive when detached.
316 An allocated namespace may be deleted to become unallocated.
317 For more details on the nuances of NVM namespaces, please see section 2
318 .Em Theory of Operation
319 and section 3
320 .Em NVM Express Architecture
321 of the latest NVM standard.
322 .Ss ns active
323 Provide a list of active namespace identifiers for the givne NVM controller.
324 .Ss ns allocated
325 Provide a list of allocated namespace identifiers for the givne NVM controller.
326 .Ss ns attach
327 Attach an nsid to a controller.
328 The primary controller is used if one is not specified.
329 .Ss ns attached
330 Provide a list of controllers attached to a nsid.
331 If only a nvme controller argument is provided, a nsid must also be specified.
332 .Ss ns controllers
333 Provide a list of all controllers in the NVM subsystem.
334 .Ss ns create
335 Creates a new namespace.
336 .Ss ns delete
337 Delete a namespace.
338 It must be currently inactive.
339 .Ss ns detach
340 Detach a namespace from a controller.
341 The namespace will become inaccessible, but its contents will remain if it is
342 .Em activated
343 again.
344 .Ss ns identify
345 Print detailed information about the namespace.
346 .Ss nsid
347 Reports the namespace id and controller device associated with the
348 .Aq Ar namespace-id
349 or
350 .Aq Ar device-id
351 argument.
352 .Ss resv acquire
353 Acquire or preempt namespace reservation, using specified parameters:
354 .Bl -tag -width 6n
355 .It Fl a
356 Acquire action:
357 .Bl -tag -compact -width 6n
358 .It Dv 0
359 Acquire
360 .It Dv 1
361 Preempt
362 .It Dv 2
363 Preempt and abort
364 .El
365 .It Fl c
366 Current reservation key.
367 .It Fl p
368 Preempt reservation key.
369 .It Fl t
370 Reservation type:
371 .Bl -tag -compact -width 6n
372 .It Dv 1
373 Write Exclusive
374 .It Dv 2
375 Exclusive Access
376 .It Dv 3
377 Write Exclusive - Registrants Only
378 .It Dv 4
379 Exclusive Access - Registrants Only
380 .It Dv 5
381 Write Exclusive - All Registrants
382 .It Dv 6
383 Exclusive Access - All Registrants
384 .El
385 .El
386 .Ss resv register
387 Register, unregister or replace reservation key, using specified parameters:
388 .Bl -tag -width 6n
389 .It Fl c
390 Current reservation key.
391 .It Fl k
392 New reservation key.
393 .It Fl r
394 Register action:
395 .Bl -tag -compact -width 6n
396 .It Dv 0
397 Register
398 .It Dv 1
399 Unregister
400 .It Dv 2
401 Replace
402 .El
403 .It Fl i
404 Ignore Existing Key
405 .It Fl p
406 Change Persist Through Power Loss State:
407 .Bl -tag -compact -width 6n
408 .It Dv 0
409 No change to PTPL state
410 .It Dv 2
411 Set PTPL state to â€˜0’.
412 Reservations are released and registrants are cleared on a power on.
413 .It Dv 3
414 Set PTPL state to â€˜1’.
415 Reservations and registrants persist across a power loss.
416 .El
417 .El
418 .Ss resv release
419 Release or clear reservation, using specified parameters:
420 .Bl -tag -width 6n
421 .It Fl c
422 Current reservation key.
423 .It Fl t
424 Reservation type.
425 .It Fl a
426 Release action:
427 .Bl -tag -compact -width 6n
428 .It Dv 0
429 Release
430 .It Dv 1
431 Clean
432 .El
433 .El
434 .Ss resv report
435 Print reservation status, using specified parameters:
436 .Bl -tag -width 6n
437 .It Fl x
438 Print reservation status in hex.
439 .It Fl e
440 Use Extended Data Structure.
441 .El
442 .Ss format
443 Format either specified namespace, or all namespaces of specified controller,
444 using specified parameters:
445 .Ar fmt
446 LBA Format,
447 .Ar mset
448 Metadata Settings,
449 .Ar pi
450 Protection Information,
451 .Ar pil
452 Protection Information Location.
453 When formatting specific namespace, existing values are used as defaults.
454 When formatting all namespaces, all parameters should be specified.
455 Some controllers may not support formatting or erasing specific or all
456 namespaces.
457 Option
458 .Fl E
459 enables User Data Erase during format.
460 Option
461 .Fl C
462 enables Cryptographic Erase during format.
463 .Ss sanitize
464 Sanitize NVM subsystem of specified controller,
465 using specified parameters:
466 .Bl -tag -width 6n
467 .It Fl a Ar operation
468 Specify the sanitize operation to perform.
469 .Bl -tag -width 16n
470 .It overwrite
471 Perform an overwrite operation by writing a user supplied
472 data pattern to the device one or more times.
473 The pattern is given by the
474 .Fl p
475 argument.
476 The number of times is given by the
477 .Fl c
478 argument.
479 .It block
480 Perform a block erase operation.
481 All the device's blocks are set to a vendor defined
482 value, typically zero.
483 .It crypto
484 Perform a cryptographic erase operation.
485 The encryption keys are changed to prevent the decryption
486 of the data.
487 .It exitfailure
488 Exits a previously failed sanitize operation.
489 A failed sanitize operation can only be exited if it was
490 run in the unrestricted completion mode, as provided by the
491 .Fl U
492 argument.
493 .El
494 .It Fl c Ar passes
495 The number of passes when performing an
496 .Sq overwrite
497 operation.
498 Valid values are between 1 and 16.
499 The default is 1.
500 .It Fl d
501 No Deallocate After Sanitize.
502 .It Fl I
503 When performing an
504 .Sq overwrite
505 operation, the pattern is inverted between consecutive passes.
506 .It Fl p Ar pattern
507 32 bits of pattern to use when performing an
508 .Sq overwrite
509 operation.
510 The pattern is repeated as needed to fill each block.
511 .It Fl U
512 Perform the sanitize in the unrestricted completion mode.
513 If the operation fails, it can later be exited with the
514 .Sq exitfailure
515 operation.
516 .It Fl r
517 Run in
518 .Dq report only
519 mode.
520 This will report status on a sanitize that is already running on the drive.
521 .El
522 .Ss power
523 Manage the power modes of the NVMe controller.
524 .Bl -tag -width 6n
525 .It Fl l
526 List all supported power modes.
527 .It Fl p Ar mode
528 Set the power mode to
529 .Ar mode .
530 This must be a mode listed with the
531 .Dl nvmecontrol power -l
532 command.
533 .It Fl w Ar hint
534 Set the workload hint for automatic power mode control.
535 .Bl -tag -compact -width 6n
536 .It 0
537 No workload hint is provided.
538 .It 1
539 Extended idle period workload.
540 The device is often idle for minutes at a time.
541 A burst of write commands comes in over a period of seconds.
542 Then the device returns to being idle.
543 .It 2
544 Heavy sequential writes.
545 A huge number of sequential writes will be submitted, filling the submission queues.
546 .It Other
547 All other values are reserved and have no standard meaning.
548 .El
549 Please see the
550 .Dq NVM Subsystem Workloads
551 section of the relevant NVM Express Base Standard for details.
552 .El
553 .Ss selftest
554 Start the specified device self-test:
555 .Bl -tag -width 6n
556 .It Fl c Ar code
557 Specify the device self-test command code.
558 Common codes are:
559 .Bl -tag -compact -width 6n
560 .It Dv 0x1
561 Start a short device self-test operation
562 .It Dv 0x2
563 Start an extended device self-test operation
564 .It Dv 0xe
565 Start a vendor specific device self-test operation
566 .It Dv 0xf
567 Abort the device self-test operation
568 .El
569 .El
570 .Ss wdc
571 The various wdc command retrieve log data from the wdc/hgst drives.
572 The
573 .Fl o
574 flag specifies a path template to use to output the files.
575 Each file takes the path template (which defaults to nothing), appends
576 the drive's serial number and the type of dump it is followed
577 by .bin.
578 These logs must be sent to the vendor for analysis.
579 This tool only provides a way to extract them.
580 .Ss passthru
581 The
582 .Dq admin-passthru
583 and
584 .Dq io-passthru
585 commands send NVMe commands to
586 either the administrative or the data part of the device.
587 These commands are expected to be compatible with nvme-cli.
588 Please see the NVM Express Base Standard for details.
589 .Bl -tag -width 16n
590 .It Fl o -opcode Ar opcode
591 Opcode to send.
592 .It Fl 2 -cdw2 Ar value
593 32-bit value for CDW2.
594 .It Fl 3 -cdw3 Ar value
595 32-bit value for CDW3.
596 .It Fl 4 -cdw10 Ar value
597 32-bit value for CDW10.
598 .It Fl 5 -cdw11 Ar value
599 32-bit value for CDW11.
600 .It Fl 6 -cdw12 Ar value
601 32-bit value for CDW12.
602 .It Fl 7 -cdw13 Ar value
603 32-bit value for CDW13.
604 .It Fl 8 -cdw14 Ar value
605 32-bit value for CDW14.
606 .It Fl 9 -cdw15 Ar value
607 32-bit value for CDW15.
608 .It Fl l -data-len
609 Length of the data for I/O (bytes).
610 .It Fl m -metadata-len
611 Length of the metadata segment for command (bytes).
612 This is ignored and not implemented in
613 .Xr nvme 4 .
614 .It Fl f -flags
615 Nvme command flags.
616 .It Fl n -namespace-id
617 Namespace ID for command (Ignored).
618 .It Fl p -prefill
619 Value to prefill payload with.
620 .It Fl b -raw-binary
621 Output in binary format (otherwise a hex dump is produced).
622 .It Fl d -dry-run
623 Do not actually execute the command, but perform sanity checks on it.
624 .It Fl r -read
625 Command reads data from the device.
626 .It Fl s -show-command
627 Show all the command values on stdout.
628 .It Fl w -write
629 Command writes data to the device.
630 .El
631 .Pp
632 Send arbitrary commands to the device.
633 Can be used to extract vendor specific logs.
634 Transfers to/from the device possible, but limited to
635 .Dv MAXPHYS
636 bytes.
637 Commands either read data or write it, but not both.
638 Commands needing metadata are not supported by the
639 .Xr nvme 4
640 drive.
641 .Sh DEVICE NAMES
642 Where
643 .Aq Ar namespace-id
644 is required, you can use either the
645 .Pa nvmeXnsY
646 device, or the disk device such as
647 .Pa ndaZ
648 or
649 .Pa nvdZ .
650 The leading
651 .Pa /dev/
652 is omitted.
653 Where
654 .Aq Ar device-id
655 is required, you can use either the
656 .Pa nvmeX
657 device, or the disk device such as
658 .Pa ndaZ
659 or
660 .Pa nvdZ .
661 For commands that take an optional
662 .Aq nsid
663 you can use it to get information on other namespaces, or to query the
664 drive itself.
665 A
666 .Aq nsid
667 of
668 .Dq 0
669 means query the drive itself.
670 .Sh EXAMPLES
671 .Dl nvmecontrol devlist
672 .Pp
673 Display a list of NVMe controllers and namespaces along with their device nodes.
674 .Pp
675 .Dl nvmecontrol identify nvme0
676 .Dl nvmecontrol identify -n 0 nvd0
677 .Pp
678 Display a human-readable summary of the nvme0
679 .Dv IDENTIFY_CONTROLLER
680 data.
681 In this example, nvd0 is connected to nvme0.
682 .Pp
683 .Dl nvmecontrol identify -x -v nvme0ns1
684 .Dl nvmecontrol identify -x -v -n 1 nvme0
685 .Pp
686 Display an hexadecimal dump of the nvme0
687 .Dv IDENTIFY_NAMESPACE
688 data for namespace 1.
689 .Pp
690 .Dl nvmecontrol perftest -n 32 -o read -s 512 -t 30 nvme0ns1
691 .Pp
692 Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds.
693 Each thread will issue a single 512 byte read command.
694 Results are printed to stdout when 30 seconds expires.
695 .Pp
696 .Dl nvmecontrol reset nvme0
697 .Dl nvmecontrol reset nda4
698 .Pp
699 Perform a controller-level reset of the nvme0 controller.
700 In this example, nda4 is wired to nvme0.
701 .Pp
702 .Dl nvmecontrol logpage -p 1 nvme0
703 .Pp
704 Display a human-readable summary of the nvme0 controller's Error Information Log.
705 Log pages defined by the NVMe specification include Error Information Log (ID=1),
706 SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3).
707 .Pp
708 .Dl nvmecontrol logpage -p 0xc1 -v wdc nvme0
709 .Pp
710 Display a human-readable summary of the nvme0's wdc-specific advanced
711 SMART data.
712 .Pp
713 .Dl nvmecontrol logpage -p 1 -x nvme0
714 .Pp
715 Display a hexadecimal dump of the nvme0 controller's Error Information Log.
716 .Pp
717 .Dl nvmecontrol logpage -p 0xcb -b nvme0 > /tmp/page-cb.bin
718 .Pp
719 Print the contents of vendor specific page 0xcb as binary data on
720 standard out.
721 Redirect it to a temporary file.
722 .Pp
723 .Dl nvmecontrol firmware -s 2 -f /tmp/nvme_firmware nvme0
724 .Pp
725 Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the
726 nvme0 controller, but do not activate the image.
727 .Pp
728 .Dl nvmecontrol firmware -s 4 -a nvme0
729 .Pp
730 Activate the firmware in slot 4 of the nvme0 controller on the next reset.
731 .Pp
732 .Dl nvmecontrol firmware -s 7 -f /tmp/nvme_firmware -a nvme0
733 .Pp
734 Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the
735 nvme0 controller and activate it on the next reset.
736 .Pp
737 .Dl nvmecontrol power -l nvme0
738 .Pp
739 List all the current power modes.
740 .Pp
741 .Dl nvmecontrol power -p 3 nvme0
742 .Pp
743 Set the current power mode.
744 .Pp
745 .Dl nvmecontrol power nvme0
746 .Pp
747 Get the current power mode.
748 .Pp
749 .Dl nvmecontrol identify -n 0 nda0
750 .Pp
751 Identify the drive data associated with the
752 .Pa nda0
753 device.
754 The corresponding
755 .Pa nvmeX
756 devices is used automatically.
757 .Pp
758 .Dl nvmecontrol identify nda0
759 .Pp
760 Get the namespace parameters associated with the
761 .Pa nda0
762 device.
763 The corresponding
764 .Pa nvmeXnsY
765 device is used automatically.
766 .Sh DYNAMIC LOADING
767 The directories
768 .Pa /lib/nvmecontrol
769 and
770 .Pa /usr/local/lib/nvmecontrol
771 are scanned for any .so files.
772 These files are loaded.
773 The members of the
774 .Va top
775 linker set are added to the top-level commands.
776 The members of the
777 .Va logpage
778 linker set are added to the logpage parsers.
779 .Sh SEE ALSO
780 .Rs
781 .%T The NVM Express Base Specification
782 .%D June 10, 2019
783 .%U https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf
784 .Re
785 .Sh HISTORY
786 The
787 .Nm
788 utility appeared in
789 .Fx 9.2 .
790 .Sh AUTHORS
791 .An -nosplit
792 .Nm
793 was developed by Intel and originally written by
794 .An Jim Harris Aq Mt jimharris@FreeBSD.org .
795 .Pp
796 This man page was written by
797 .An Jim Harris Aq Mt jimharris@FreeBSD.org .