xref: /freebsd/usr.sbin/diskinfo/diskinfo.8 (revision d6b92ffa)
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.\" $FreeBSD$
31.\"
32.Dd July 4, 2017
33.Dt DISKINFO 8
34.Os
35.Sh NAME
36.Nm diskinfo
37.Nd get information about disk device
38.Sh SYNOPSIS
39.Nm
40.Op Fl citSvw
41.Ar disk ...
42.Nm
43.Op Fl p
44.Ar disk ...
45.Nm
46.Op Fl s
47.Ar disk ...
48.Sh DESCRIPTION
49The
50.Nm
51utility prints out information about a disk device,
52and optionally runs a naive performance test on the device.
53.Pp
54The following options are available:
55.Bl -tag -width ".Fl v"
56.It Fl v
57Print fields one per line with a descriptive comment.
58.It Fl c
59Perform a simple measurement of the I/O read command overhead.
60.It Fl i
61Perform a simple IOPS benchmark.
62.It Fl p
63Return the physical path of the disk.
64This is a string that identifies the physical path to the disk in the
65storage enclosure.
66.It Fl s
67Return the disk serial number
68.It Fl S
69Perform synchronous random write test (ZFS SLOG test),
70measuring time required to write data blocks of different size and
71flush disk cache.
72Blocks of more then 128KB are written with multiple parallel operations.
73.It Fl t
74Perform a simple and rather naive benchmark of the disks seek
75and transfer performance.
76.It Fl w
77Allow disruptive write tests.
78.El
79.Pp
80If given no arguments, the output will be a single line per specified device
81with the following fields: device name, sectorsize, media size in bytes,
82media size in sectors, stripe size, stripe offset, firmware cylinders,
83firmware heads, and firmware sectors.
84The last three fields are only present if the information is available.
85.It Fl i
86Return the disk ident, usually the serial number.
87.It Fl p
88Return the physical path of the disk.
89This is a string that identifies the physical path to the disk in the
90storage enclosure.
91.El
92.Sh HISTORY
93The
94.Nm
95command appeared in
96.Fx 5.1 .
97.Sh AUTHORS
98The
99.Nm
100utility was written by
101.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .
102.Sh BUGS
103There are in order of increasing severity: lies,
104damn lies, statistics, and computer benchmarks.
105