.\" $NetBSD: nvmectl.8,v 1.5 2018/04/18 10:17:54 nonaka Exp $ .\" .\" Copyright (c) 2012 Intel Corporation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions, and the following disclaimer, .\" without modification. .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer .\" substantially similar to the "NO WARRANTY" disclaimer below .\" ("Disclaimer") and any redistribution must be conditioned upon .\" including a substantially similar Disclaimer requirement for further .\" binary redistribution. .\" .\" NO WARRANTY .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGES. .\" .\" nvmecontrol man page. .\" .\" Author: Jim Harris .\" .\" $FreeBSD: head/sbin/nvmecontrol/nvmecontrol.8 314230 2017-02-25 00:09:16Z imp $ .\" .Dd May 19, 2016 .Dt NVMECTL 8 .Os .Sh NAME .Nm nvmectl .Nd NVM Express control utility .Sh SYNOPSIS .Nm .Ic devlist .Nm .Ic identify .Op Fl x Op Fl v .Ar device_id .\".Nm .\".Ic perftest .\".Op Fl p .\".Aq Fl n Ar num_threads .\".Aq Fl o Ar read|write .\".Aq Fl s Ar size_in_bytes .\".Aq Fl t Ar time_in_sec .\".Aq namespace_id .\".Nm .\".Ic reset .\".Aq controller_id .Nm .Ic logpage .Op Fl x .Op Fl p Ar page_id .Op Fl v Ar vendor-string .Op Fl b .Ar device_id Ns | Ns Ar namespace_id .\".Nm .\".Ic firmware .\".Op Fl a .\".Op Fl s Ar slot .\".Op Fl f Ar path_to_firmware .\".Aq device id .Nm .Ic power .Op Fl l .Op Fl p Ar power_state .Op Fl w Ar workload_hint .Ar device_id .Nm .Ic wdc cap-diag .Op Fl o path_template .Ar device_id .Sh DESCRIPTION NVM Express (NVMe) is a storage protocol standard, for SSDs and other high-speed storage devices over PCI Express. .Ss logpage The logpage command knows how to print log pages of various types. It also knows about vendor specific log pages from hgst/wdc and intel. Page 0xc1 for hgst/wdc contains the advanced smart information about the drive. Page 0xc1 is read latency stats for intel. Page 0xc2 is write latency stats for intel. Page 0xc5 is temperature stats for intel. Page 0xca is advanced smart information for intel. .Pp Specifying .Fl p .Ic help will list all valid vendors and pages. .Fl x will print the page as hex. .Fl b will print the binary data for the page. .Ss wdc The various wdc commands retrieve log data from the wdc/hgst drives. The .Fl o flag specifies a path template to use to output the files. Each file takes the path template (which defaults to nothing), appends the drive's serial number and the type of dump it is followed by .Pa .bin . These logs must be sent to the vendor for analysis. This tool only provides a way to extract them. .Sh EXAMPLES .Dl nvmectl devlist .Pp Display a list of NVMe controllers and namespaces along with their device nodes. .Pp .Dl nvmectl identify nvme0 .Pp Display a human-readable summary of the nvme0 IDENTIFY_CONTROLLER data. .Pp .Dl nvmectl identify -x -v nvme0ns1 .Pp Display an hexadecimal dump of the nvme0 .Dv IDENTIFY_NAMESPACE data for namespace 1. .\".Pp .\".Dl nvmectl perftest -n 32 -o read -s 512 -t 30 nvme0ns1 .\".Pp .\"Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds. .\"Each thread will issue a single 512 byte read command. .\"Results are printed to stdout when 30 seconds expires. .\".Pp .\".Dl nvmectl reset nvme0 .\".Pp .\"Perform a controller-level reset of the nvme0 controller. .Pp .Dl nvmectl logpage -p 1 nvme0 .Pp Display a human-readable summary of the nvme0 controller's Error Information Log. Log pages defined by the NVMe specification include Error Information Log (ID=1), SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3). .Pp .Dl nvmectl logpage -p 0xc1 -v wdc nvme0 .Pp Display a human-readable summary of the nvme0's wdc-specific advanced SMART data. .Pp .Dl nvmectl logpage -p 1 -x nvme0 .Pp Display a hexadecimal dump of the nvme0 controller's Error Information Log. .Pp .Dl nvmectl logpage -p 0xcb -b nvme0 > /tmp/page-cb.bin .Pp Print the contents of vendor specific page 0xcb as binary data on standard out. Redirect it to a temporary file. .\".Pp .\".Dl nvmectl firmware -s 2 -f /tmp/nvme_firmware nvme0 .\".Pp .\"Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the .\"nvme0 controller, but do not activate the image. .\".Pp .\".Dl nvmectl firmware -s 4 -a nvme0 .\".Pp .\"Activate the firmware in slot 4 of the nvme0 controller on the next reset. .\".Pp .\".Dl nvmectl firmware -s 7 -f /tmp/nvme_firmware -a nvme0 .\".Pp .\"Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the .\"nvme0 controller and activate it on the next reset. .Pp .Dl nvmectl power -l nvme0 .Pp List all the current power modes. .Pp .Dl nvmectl power -p 3 nvme0 .Pp Set the current power mode. .Pp .Dl nvmectl power nvme0 .Pp Get the current power mode. .Sh HISTORY The nvmecontrol utility appeared in .Fx 9.2 . .Sh AUTHORS .An -nosplit nvmecontrol was developed by Intel and originally written by .An Jim Harris Aq Mt jimharris@FreeBSD.org . .Pp This man page was written by .An Jim Harris Aq Mt jimharris@FreeBSD.org . ref='/netbsd/commit/lib/libusbhid?h=lockdoc-9.3-vfs-0.2&id=18cfaad6998e27748bdfd89c1d8ee7a94f6dc47d'>Use Lk macro when dealing with URLs. Another part of PR/29238.njoly 2012-01-17PR/45850: Pierre Pronchery: USB multi-touch panels are not supportedchristos 2011-05-23Remove pointless self-assignmentjoerg 2010-08-13Improve usbhid(3) descriptor/report parsing:jakllsch 2010-05-12note const from actual APIplunky 2010-05-12hid_get_data() will read an extra byte if the data being read ends onplunky 2010-03-22Use .In instead of .Ar Pa for header files.joerg 2010-01-05Fix copy-paste-o. Per the HID spec, Global Item Tag 0b001101nn isjakllsch 2009-07-10Add more Keypad usages in the Keyboard/Keypad pagejakllsch 2007-05-24add generic Device Controls usage page informationplunky 2007-04-11add const to the data for hid_use_report_desc() since it doesplunky 2007-03-23add __BEGIN_DECLS/__END_DECLS so that this can be used from c++ libsdrochner 2006-05-19cast shift argument in macro.christos 2006-04-09fix debug build.christos 2005-12-14Fix sign extension broken by previous. dillo hacked here too.wiz 2005-12-05fix non-portable right shifts.christos 2004-10-28Use (unsigned char) cast to sanitise arguments to ctype functions.dsl 2004-10-27Fix a load of international alphabet problems with isxxx() and toupper()dsl 2004-06-10Minor fix in SEE ALSO; put xref first; .Pp before a sentence.uebayasi 2004-05-16Add entries for items found on the Microsoft Wireless MultiMedia Keyboard 1.1.lukem 2004-01-05The report size is not a local item, so don't clear it when clearing local it...augustss 2003-07-26netbsd.org->NetBSD.orgsalo 2003-06-06Grammar, spelling, markup fixes from jmc@openbsd.wiz 2003-04-16Usewiz 2003-03-08add RCSIDlukem 2003-02-14'NetBSD.org' and some mdoc fixes.grant 2002-10-01New sentence, new line. From Robert Elz.wiz 2002-07-20sweep of errx/warnx, remove unnecessary trailing \ngrant 2002-02-20Prefix structure members to protect them against clashes with eg. c++ keywords.christos 2002-02-07Generate <>& symbolically.ross 2002-01-19Fix typo in URL, reported by Peter Valchev in private mail.wiz 2002-01-12Corrected typo: hid(4) -> uhid(4)kristerw 2001-12-29Fix a size calculation bug.augustss 2001-12-28Update for rename from usb to usbhid.wiz 2001-12-28Update for uhidev(4) changes.augustss