2 .\" Copyright (c) 2018-2019 Alexander Motin <mav@FreeBSD.org>
3 .\" Copyright (c) 2012 Intel Corporation
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions, and the following disclaimer,
11 .\" without modification.
12 .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
13 .\" substantially similar to the "NO WARRANTY" disclaimer below
14 .\" ("Disclaimer") and any redistribution must be conditioned upon
15 .\" including a substantially similar Disclaimer requirement for further
16 .\" binary redistribution.
19 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
22 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 .\" POSSIBILITY OF SUCH DAMAGES.
31 .\" nvmecontrol man page.
33 .\" Author: Jim Harris <jimharris@FreeBSD.org>
42 .Nd NVM Express control utility
54 .Aq Fl n Ar num_threads
55 .Aq Fl o Ar read|write
57 .Aq Fl s Ar size_in_bytes
58 .Aq Fl t Ar time_in_sec
67 .Op Fl v Ar vendor-string
123 .Op Fl f Ar path_to_firmware
140 .Op Fl w workload_hint
143 .Op Fl o path_template
147 .Op Fl o path_template
150 .Ic wdc get-crash-dump
151 .Op Fl o path_template
157 .\" .Ic wdc purge-monitor
160 NVM Express (NVMe) is a storage protocol standard, for SSDs and other
161 high-speed storage devices over PCI Express.
164 The logpage command knows how to print log pages of various types.
165 It also knows about vendor specific log pages from hgst/wdc and intel.
166 Note that some vendors use the same log page numbers for different data.
168 .Bl -tag -compact -width "Page 0x00"
176 Advanced SMART information (WDC/HGST)
178 Read latency stats (Intel)
180 Wite latency stats (Intel)
182 Temperature stats (Intel)
184 Advanced SMART information (Intel)
190 will list all valid vendors and pages.
192 will print the page as hex.
194 will print the binary data for the page.
196 Various namespace management commands.
197 If namespace management is supported by device, allow list, create and delete
198 namespaces, list, attach and detach controllers to namespaces.
200 Format either specified namespace, or all namespaces of specified controller,
201 using specified parameters:
207 Protection Information,
209 Protection Information Location.
210 When formatting specific namespace, existing values are used as defaults.
211 When formatting all namespaces, all parameters should be specified.
212 Some controllers may not support formatting or erasing specific or all
216 enables User Data Erase during format.
219 enables Cryptographic Erase during format.
221 The various wdc command retrieve log data from the wdc/hgst drives.
224 flag specifies a path template to use to output the files.
225 Each file takes the path template (which defaults to nothing), appends
226 the drive's serial number and the type of dump it is followed
228 These logs must be sent to the vendor for analysis.
229 This tool only provides a way to extract them.
231 .Dl nvmecontrol devlist
233 Display a list of NVMe controllers and namespaces along with their device nodes.
235 .Dl nvmecontrol identify nvme0
237 Display a human-readable summary of the nvme0 IDENTIFY_CONTROLLER data.
239 .Dl nvmecontrol identify -x -v nvme0ns1
241 Display an hexadecimal dump of the nvme0 IDENTIFY_NAMESPACE data for namespace
244 .Dl nvmecontrol perftest -n 32 -o read -s 512 -t 30 nvme0ns1
246 Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds.
247 Each thread will issue a single 512 byte read command.
248 Results are printed to stdout when 30 seconds expires.
250 .Dl nvmecontrol reset nvme0
252 Perform a controller-level reset of the nvme0 controller.
254 .Dl nvmecontrol logpage -p 1 nvme0
256 Display a human-readable summary of the nvme0 controller's Error Information Log.
257 Log pages defined by the NVMe specification include Error Information Log (ID=1),
258 SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3).
260 .Dl nvmecontrol logpage -p 0xc1 -v wdc nvme0
262 Display a human-readable summary of the nvme0's wdc-specific advanced
265 .Dl nvmecontrol logpage -p 1 -x nvme0
267 Display a hexadecimal dump of the nvme0 controller's Error Information Log.
269 .Dl nvmecontrol logpage -p 0xcb -b nvme0 > /tmp/page-cb.bin
271 Print the contents of vendor specific page 0xcb as binary data on
273 Redirect it to a temporary file.
275 .Dl nvmecontrol firmware -s 2 -f /tmp/nvme_firmware nvme0
277 Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the
278 nvme0 controller, but do not activate the image.
280 .Dl nvmecontrol firmware -s 4 -a nvme0
282 Activate the firmware in slot 4 of the nvme0 controller on the next reset.
284 .Dl nvmecontrol firmware -s 7 -f /tmp/nvme_firmware -a nvme0
286 Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the
287 nvme0 controller and activate it on the next reset.
289 .Dl nvmecontrol power -l nvme0
291 List all the current power modes.
293 .Dl nvmecontrol power -p 3 nvme0
295 Set the current power mode.
297 .Dl nvmecontrol power nvme0
299 Get the current power mode.
304 .Pa /usr/local/lib/nvmecontrol
305 are scanned for any .so files.
306 These files are loaded.
309 linker set are added to the top-level commands.
312 linker set are added to the logpage parsers.
321 was developed by Intel and originally written by
322 .An Jim Harris Aq Mt jimharris@FreeBSD.org .
324 This man page was written by
325 .An Jim Harris Aq Mt jimharris@FreeBSD.org .