xref: /freebsd/sbin/nvmecontrol/nvmecontrol.8 (revision a0ee8cc636cd5c2374ec44ca71226564ea0bca95)
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.Aq device id
66.Aq namespace id
67.Nm
68.Ic firmware
69.Op Fl s Ar slot
70.Op Fl f Ar path_to_firmware
71.Op Fl a
72.Aq device id
73.Sh DESCRIPTION
74NVM Express (NVMe) is a storage protocol standard, for SSDs and other
75high-speed storage devices over PCI Express.
76.Sh EXAMPLES
77.Dl nvmecontrol devlist
78.Pp
79Display a list of NVMe controllers and namespaces along with their device nodes.
80.Pp
81.Dl nvmecontrol identify nvme0
82.Pp
83Display a human-readable summary of the nvme0 IDENTIFY_CONTROLLER data.
84.Pp
85.Dl nvmecontrol identify -x -v nvme0ns1
86.Pp
87Display a hexadecimal dump of the nvme0 IDENTIFY_NAMESPACE data for namespace
881.
89.Pp
90.Dl nvmecontrol perftest -n 32 -o read -s 512 -t 30 nvme0ns1
91.Pp
92Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds.  Each
93thread will issue a single 512 byte read command.  Results are printed to
94stdout when 30 seconds expires.
95.Pp
96.Dl nvmecontrol reset nvme0
97.Pp
98Perform a controller-level reset of the nvme0 controller.
99.Pp
100.Dl nvmecontrol logpage -p 1 nvme0
101.Pp
102Display a human-readable summary of the nvme0 controller's Error Information Log.
103Log pages defined by the NVMe specification include Error Information Log (ID=1),
104SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3).
105.Pp
106.Dl nvmecontrol logpage -p 1 -x nvme0
107.Pp
108Display a hexidecimal dump of the nvme0 controller's Error Information Log.
109.Pp
110.Dl nvmecontrol firmware -s 2 -f /tmp/nvme_firmware nvme0
111.Pp
112Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the
113nvme0 controller, but do not activate the image.
114.Pp
115.Dl nvmecontrol firmware -s 4 -a nvme0
116.Pp
117Activate the firmware in slot 4 of the nvme0 controller on the next reset.
118.Pp
119.Dl nvmecontrol firmware -s 7 -f /tmp/nvme_firmware -a nvme0
120.Pp
121Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the
122nvme0 controller and activate it on the next reset.
123.Sh AUTHORS
124.An -nosplit
125.Nm
126was developed by Intel and originally written by
127.An Jim Harris Aq Mt jimharris@FreeBSD.org .
128.Pp
129This man page was written by
130.An Jim Harris Aq Mt jimharris@FreeBSD.org .
131