]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/nvmecontrol/nvmecontrol.8
MFC r313257 (by imp):
[FreeBSD/FreeBSD.git] / sbin / nvmecontrol / nvmecontrol.8
1 .\"
2 .\" Copyright (c) 2012 Intel Corporation
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions, and the following disclaimer,
10 .\"    without modification.
11 .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 .\"    substantially similar to the "NO WARRANTY" disclaimer below
13 .\"    ("Disclaimer") and any redistribution must be conditioned upon
14 .\"    including a substantially similar Disclaimer requirement for further
15 .\"    binary redistribution.
16 .\"
17 .\" NO WARRANTY
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGES.
29 .\"
30 .\" nvmecontrol man page.
31 .\"
32 .\" Author: Jim Harris <jimharris@FreeBSD.org>
33 .\"
34 .\" $FreeBSD$
35 .\"
36 .Dd March 26, 2013
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 .Nm
46 .Ic identify
47 .Op Fl v
48 .Op Fl x
49 .Aq device id
50 .Nm
51 .Ic perftest
52 .Aq Fl n Ar num_threads
53 .Aq Fl o Ar read|write
54 .Op Fl p
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 .Aq Fl p Ar page_id
64 .Op Fl x
65 .Op Fl v Ar vendor-string
66 .Aq device id
67 .Aq namespace id
68 .Nm
69 .Ic firmware
70 .Op Fl s Ar slot
71 .Op Fl f Ar path_to_firmware
72 .Op Fl a
73 .Aq device id
74 .Nm
75 .Ic power
76 .Op Fl l
77 .Op Fl p power_state
78 .Op Fl w workload_hint
79 .Nm
80 .Ic wdc cap-diag
81 .Op Fl o path_template
82 .Aq device id
83 .Nm
84 .Ic wdc drive-log
85 .Op Fl o path_template
86 .Aq device id
87 .Nm
88 .Ic wdc get-crash-dump
89 .Op Fl o path_template
90 .Aq device id
91 .\" .Nm
92 .\" .Ic wdc purge
93 .\" .Aq device id
94 .\" .Nm
95 .\" .Ic wdc purge-monitor
96 .\" .Aq device id
97 .Sh DESCRIPTION
98 NVM Express (NVMe) is a storage protocol standard, for SSDs and other
99 high-speed storage devices over PCI Express.
100 .Pp
101 .Ss logpage
102 The logpage command knows how to print log pages of various types.
103 It also knows about vendor specific log pages from hgst/wdc and intel.
104 Page 0xc1 for hgst/wdc contains the advanced smart information about
105 the drive.
106 Page 0xc1 is read latency stats for intel.
107 Page 0xc2 is write latency stats for intel.
108 Page 0xc5 is temperature stats for intel.
109 Page 0xca is advanced smart information for intel.
110 .Ss wdc
111 The various wdc command retrieve log data from the wdc/hgst drives.
112 The
113 .Fl o
114 flag specifies a path template to use to output the files.
115 Each file takes the path template (which defaults to nothing), appends
116 the drive's serial number and the type of dump it is followed
117 by .bin.
118 These logs must be sent to the vendor for analysis.
119 This tool only provides a way to extract them.
120 .Sh EXAMPLES
121 .Dl nvmecontrol devlist
122 .Pp
123 Display a list of NVMe controllers and namespaces along with their device nodes.
124 .Pp
125 .Dl nvmecontrol identify nvme0
126 .Pp
127 Display a human-readable summary of the nvme0 IDENTIFY_CONTROLLER data.
128 .Pp
129 .Dl nvmecontrol identify -x -v nvme0ns1
130 .Pp
131 Display an hexadecimal dump of the nvme0 IDENTIFY_NAMESPACE data for namespace
132 1.
133 .Pp
134 .Dl nvmecontrol perftest -n 32 -o read -s 512 -t 30 nvme0ns1
135 .Pp
136 Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds.  Each
137 thread will issue a single 512 byte read command.  Results are printed to
138 stdout when 30 seconds expires.
139 .Pp
140 .Dl nvmecontrol reset nvme0
141 .Pp
142 Perform a controller-level reset of the nvme0 controller.
143 .Pp
144 .Dl nvmecontrol logpage -p 1 nvme0
145 .Pp
146 Display a human-readable summary of the nvme0 controller's Error Information Log.
147 Log pages defined by the NVMe specification include Error Information Log (ID=1),
148 SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3).
149 .Pp
150 .Dl nvmecontrol logpage -p 1 -x nvme0
151 .Pp
152 Display a hexadecimal dump of the nvme0 controller's Error Information Log.
153 .Pp
154 .Dl nvmecontrol firmware -s 2 -f /tmp/nvme_firmware nvme0
155 .Pp
156 Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the
157 nvme0 controller, but do not activate the image.
158 .Pp
159 .Dl nvmecontrol firmware -s 4 -a nvme0
160 .Pp
161 Activate the firmware in slot 4 of the nvme0 controller on the next reset.
162 .Pp
163 .Dl nvmecontrol firmware -s 7 -f /tmp/nvme_firmware -a nvme0
164 .Pp
165 Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the
166 nvme0 controller and activate it on the next reset.
167 .Pp
168 .Dl nvmecontrol power -l nvme0
169 .Pp
170 List all the current power modes.
171 .Pp
172 .Dl nvmecontrol power -p 3 nvme0
173 .Pp
174 Set the current power mode.
175 .Pp
176 .Dl nvmecontrol power nvme0
177 .Pp
178 Get the current power mode.
179 .Sh AUTHORS
180 .An -nosplit
181 .Nm
182 was developed by Intel and originally written by
183 .An Jim Harris Aq Mt jimharris@FreeBSD.org .
184 .Pp
185 This man page was written by
186 .An Jim Harris Aq Mt jimharris@FreeBSD.org .