xref: /freebsd/usr.sbin/diskinfo/diskinfo.8 (revision f5463265955b829775bbb32e1fd0bc11dafc36ce)
1.\"
2.\" Copyright (c) 2003 Poul-Henning Kamp
3.\" Copyright (c) 2017 Alexander Motin <mav@FreeBSD.org>
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.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. The names of the authors may not be used to endorse or promote
15.\"    products derived from this software without specific prior written
16.\"    permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.Dd July 4, 2017
31.Dt DISKINFO 8
32.Os
33.Sh NAME
34.Nm diskinfo
35.Nd get information about disk device
36.Sh SYNOPSIS
37.Nm
38.Op Fl citSvw
39.Ar disk ...
40.Nm
41.Op Fl p
42.Ar disk ...
43.Nm
44.Op Fl s
45.Ar disk ...
46.Sh DESCRIPTION
47The
48.Nm
49utility prints out information about a disk device,
50and optionally runs a naive performance test on the device.
51.Pp
52The following options are available:
53.Bl -tag -width ".Fl v"
54.It Fl v
55Print fields one per line with a descriptive comment.
56.It Fl c
57Perform a simple measurement of the I/O read command overhead.
58.It Fl i
59Perform a simple IOPS benchmark.
60.It Fl p
61Return the physical path of the disk.
62This is a string that identifies the physical path to the disk in the
63storage enclosure.
64.It Fl s
65Return the disk ident, usually the serial number.
66.It Fl S
67Perform synchronous random write test (ZFS SLOG test),
68measuring time required to write data blocks of different size and
69flush disk cache.
70Blocks of more then 128KB are written with multiple parallel operations.
71.It Fl t
72Perform a simple and rather naive benchmark of the disks seek
73and transfer performance.
74.It Fl w
75Allow disruptive write tests.
76.El
77.Pp
78If given no arguments, the output will be a single line per specified device
79with the following fields: device name, sectorsize, media size in bytes,
80media size in sectors, stripe size, stripe offset, firmware cylinders,
81firmware heads, and firmware sectors.
82The last three fields are only present if the information is available.
83.Sh HISTORY
84The
85.Nm
86command appeared in
87.Fx 5.1 .
88.Sh AUTHORS
89The
90.Nm
91utility was written by
92.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .
93.Sh BUGS
94There are in order of increasing severity: lies,
95damn lies, statistics, and computer benchmarks.
96