xref: /netbsd-src/sbin/nvmectl/nvmectl.8 (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1.\" $NetBSD: nvmectl.8,v 1.2 2016/06/05 09:13:08 wiz Exp $
2.\"
3.\" Copyright (c) 2012 Intel Corporation
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
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.
17.\"
18.\" NO WARRANTY
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.
30.\"
31.\" nvmecontrol man page.
32.\"
33.\" Author: Jim Harris <jimharris@FreeBSD.org>
34.\"
35.\" $FreeBSD: head/sbin/nvmecontrol/nvmecontrol.8 299151 2016-05-06 03:11:34Z pfg $
36.\"
37.Dd May 19, 2016
38.Dt NVMECTL 8
39.Os
40.Sh NAME
41.Nm nvmectl
42.Nd NVM Express control utility
43.Sh SYNOPSIS
44.Nm
45.Ic devlist
46.Nm
47.Ic identify
48.Op Fl x Op Fl v
49.Ar device_id
50.\".Nm
51.\".Ic perftest
52.\".Op Fl p
53.\".Aq Fl n Ar num_threads
54.\".Aq Fl o Ar read|write
55.\".Aq Fl s Ar size_in_bytes
56.\".Aq Fl t Ar time_in_sec
57.\".Aq namespace id
58.\".Nm
59.\".Ic reset
60.\".Aq controller id
61.Nm
62.Ic logpage
63.Op Fl x
64.Op Fl p Ar page_id
65.Ar device_id Ns | Ns Ar namespace_id
66.\".Nm
67.\".Ic firmware
68.\".Op Fl a
69.\".Op Fl s Ar slot
70.\".Op Fl f Ar path_to_firmware
71.\".Aq device id
72.Nm
73.Ic power
74.Op Fl l
75.Op Fl p Ar power_state
76.Op Fl w Ar workload_hint
77.Ar device_id
78.Sh DESCRIPTION
79NVM Express (NVMe) is a storage protocol standard, for SSDs and other
80high-speed storage devices over PCI Express.
81.Sh EXAMPLES
82.Dl nvmectl devlist
83.Pp
84Display a list of NVMe controllers and namespaces along with their device nodes.
85.Pp
86.Dl nvmectl identify nvme0
87.Pp
88Display a human-readable summary of the nvme0 IDENTIFY_CONTROLLER data.
89.Pp
90.Dl nvmectl identify -x -v nvme0ns1
91.Pp
92Display an hexadecimal dump of the nvme0
93.Dv IDENTIFY_NAMESPACE
94data for namespace 1.
95.\".Pp
96.\".Dl nvmectl perftest -n 32 -o read -s 512 -t 30 nvme0ns1
97.\".Pp
98.\"Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds.  Each
99.\"thread will issue a single 512 byte read command.  Results are printed to
100.\"stdout when 30 seconds expires.
101.\".Pp
102.\".Dl nvmectl reset nvme0
103.\".Pp
104.\"Perform a controller-level reset of the nvme0 controller.
105.Pp
106.Dl nvmectl logpage -p 1 nvme0
107.Pp
108Display a human-readable summary of the nvme0 controller's Error Information Log.
109Log pages defined by the NVMe specification include Error Information Log (ID=1),
110SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3).
111.Pp
112.Dl nvmectl logpage -p 1 -x nvme0
113.Pp
114Display a hexadecimal dump of the nvme0 controller's Error Information Log.
115.\".Pp
116.\".Dl nvmectl firmware -s 2 -f /tmp/nvme_firmware nvme0
117.\".Pp
118.\"Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the
119.\"nvme0 controller, but do not activate the image.
120.\".Pp
121.\".Dl nvmectl firmware -s 4 -a nvme0
122.\".Pp
123.\"Activate the firmware in slot 4 of the nvme0 controller on the next reset.
124.\".Pp
125.\".Dl nvmectl firmware -s 7 -f /tmp/nvme_firmware -a nvme0
126.\".Pp
127.\"Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the
128.\"nvme0 controller and activate it on the next reset.
129.Pp
130.Dl nvmectl power -l nvme0
131.Pp
132List all the current power modes.
133.Pp
134.Dl nvmectl power -p 3 nvme0
135.Pp
136Set the current power mode.
137.Pp
138.Dl nvmectl power nvme0
139.Pp
140Get the current power mode.
141.Sh AUTHORS
142.An -nosplit
143nvmecontrol was developed by Intel and originally written by
144.An Jim Harris Aq Mt jimharris@FreeBSD.org .
145.Pp
146This man page was written by
147.An Jim Harris Aq Mt jimharris@FreeBSD.org .
148