xref: /freebsd/usr.sbin/diskinfo/diskinfo.8 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
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 March 5, 2024
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 l
42.Fl p
43.Ar disk ...
44.Nm
45.Op Fl l
46.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 l
63In case of
64.Fl p
65or
66.Fl s
67modes prepend each line of an output with a device name using a tab
68character as a separator.
69.It Fl p
70Return the physical path of the disk.
71This is a string that identifies the physical path to the disk in the
72storage enclosure.
73.It Fl s
74Return the disk ident, usually the serial number.
75.It Fl S
76Perform synchronous random write test (ZFS SLOG test),
77measuring time required to write data blocks of different size and
78flush disk cache.
79Blocks of more then 128KB are written with multiple parallel operations.
80.It Fl t
81Perform a simple and rather naive benchmark of the disks seek
82and transfer performance.
83.It Fl w
84Allow disruptive write tests.
85.El
86.Pp
87If given no arguments, the output will be a single line per specified device
88with the following fields: device name, sectorsize, media size in bytes,
89media size in sectors, stripe size, stripe offset, firmware cylinders,
90firmware heads, and firmware sectors.
91The last three fields are only present if the information is available.
92.Sh EXAMPLES
93List first ten (at most)
94.Xr da 4
95devices with corresponding serial numbers:
96.Pp
97.Dl diskinfo -ls /dev/da?
98.Sh SEE ALSO
99.Xr da 4
100.Sh HISTORY
101The
102.Nm
103command appeared in
104.Fx 5.1 .
105.Sh AUTHORS
106The
107.Nm
108utility was written by
109.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .
110.Sh BUGS
111There are in order of increasing severity: lies,
112damn lies, statistics, and computer benchmarks.
113