xref: /freebsd/usr.sbin/diskinfo/diskinfo.8 (revision e333110d1de748e50051d1305b5438d1bc54eeb4)
1a362eb63SPoul-Henning Kamp.\"
2a362eb63SPoul-Henning Kamp.\" Copyright (c) 2003 Poul-Henning Kamp
31a01f934SAlexander Motin.\" Copyright (c) 2017 Alexander Motin <mav@FreeBSD.org>
4a362eb63SPoul-Henning Kamp.\" All rights reserved.
5a362eb63SPoul-Henning Kamp.\"
6a362eb63SPoul-Henning Kamp.\" Redistribution and use in source and binary forms, with or without
7a362eb63SPoul-Henning Kamp.\" modification, are permitted provided that the following conditions
8a362eb63SPoul-Henning Kamp.\" are met:
9a362eb63SPoul-Henning Kamp.\" 1. Redistributions of source code must retain the above copyright
10a362eb63SPoul-Henning Kamp.\"    notice, this list of conditions and the following disclaimer.
11a362eb63SPoul-Henning Kamp.\" 2. Redistributions in binary form must reproduce the above copyright
12a362eb63SPoul-Henning Kamp.\"    notice, this list of conditions and the following disclaimer in the
13a362eb63SPoul-Henning Kamp.\"    documentation and/or other materials provided with the distribution.
14a362eb63SPoul-Henning Kamp.\" 3. The names of the authors may not be used to endorse or promote
15a362eb63SPoul-Henning Kamp.\"    products derived from this software without specific prior written
16a362eb63SPoul-Henning Kamp.\"    permission.
17a362eb63SPoul-Henning Kamp.\"
18a362eb63SPoul-Henning Kamp.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19a362eb63SPoul-Henning Kamp.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20a362eb63SPoul-Henning Kamp.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21a362eb63SPoul-Henning Kamp.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22a362eb63SPoul-Henning Kamp.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23a362eb63SPoul-Henning Kamp.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24a362eb63SPoul-Henning Kamp.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25a362eb63SPoul-Henning Kamp.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26a362eb63SPoul-Henning Kamp.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27a362eb63SPoul-Henning Kamp.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28a362eb63SPoul-Henning Kamp.\" SUCH DAMAGE.
29a362eb63SPoul-Henning Kamp.\"
30*e333110dSEugene Grosbein.Dd March 5, 2024
31a362eb63SPoul-Henning Kamp.Dt DISKINFO 8
32a362eb63SPoul-Henning Kamp.Os
33a362eb63SPoul-Henning Kamp.Sh NAME
34a362eb63SPoul-Henning Kamp.Nm diskinfo
35a362eb63SPoul-Henning Kamp.Nd get information about disk device
36a362eb63SPoul-Henning Kamp.Sh SYNOPSIS
37a362eb63SPoul-Henning Kamp.Nm
381a01f934SAlexander Motin.Op Fl citSvw
39a362eb63SPoul-Henning Kamp.Ar disk ...
40278a04f5SAllan Jude.Nm
41*e333110dSEugene Grosbein.Op Fl l
42*e333110dSEugene Grosbein.Fl p
43278a04f5SAllan Jude.Ar disk ...
44278a04f5SAllan Jude.Nm
45*e333110dSEugene Grosbein.Op Fl l
46*e333110dSEugene Grosbein.Fl s
47278a04f5SAllan Jude.Ar disk ...
48a362eb63SPoul-Henning Kamp.Sh DESCRIPTION
49a362eb63SPoul-Henning KampThe
50a362eb63SPoul-Henning Kamp.Nm
51a388918dSRuslan Ermilovutility prints out information about a disk device,
52a388918dSRuslan Ermilovand optionally runs a naive performance test on the device.
53a362eb63SPoul-Henning Kamp.Pp
54af375c28SEdward Tomasz NapieralaThe following options are available:
55af375c28SEdward Tomasz Napierala.Bl -tag -width ".Fl v"
56af375c28SEdward Tomasz Napierala.It Fl v
57af375c28SEdward Tomasz NapieralaPrint fields one per line with a descriptive comment.
58af375c28SEdward Tomasz Napierala.It Fl c
59af375c28SEdward Tomasz NapieralaPerform a simple measurement of the I/O read command overhead.
60af375c28SEdward Tomasz Napierala.It Fl i
61af375c28SEdward Tomasz NapieralaPerform a simple IOPS benchmark.
62*e333110dSEugene Grosbein.It Fl l
63*e333110dSEugene GrosbeinIn case of
64*e333110dSEugene Grosbein.Fl p
65*e333110dSEugene Grosbeinor
66*e333110dSEugene Grosbein.Fl s
67*e333110dSEugene Grosbeinmodes prepend each line of an output with a device name using a tab
68*e333110dSEugene Grosbeincharacter as a separator.
69278a04f5SAllan Jude.It Fl p
70278a04f5SAllan JudeReturn the physical path of the disk.
71278a04f5SAllan JudeThis is a string that identifies the physical path to the disk in the
72875a1f77SAllan Judestorage enclosure.
73278a04f5SAllan Jude.It Fl s
74780dc32bSAlan SomersReturn the disk ident, usually the serial number.
751a01f934SAlexander Motin.It Fl S
761a01f934SAlexander MotinPerform synchronous random write test (ZFS SLOG test),
771a01f934SAlexander Motinmeasuring time required to write data blocks of different size and
781a01f934SAlexander Motinflush disk cache.
791a01f934SAlexander MotinBlocks of more then 128KB are written with multiple parallel operations.
80af375c28SEdward Tomasz Napierala.It Fl t
81af375c28SEdward Tomasz NapieralaPerform a simple and rather naive benchmark of the disks seek
82af375c28SEdward Tomasz Napieralaand transfer performance.
831a01f934SAlexander Motin.It Fl w
841a01f934SAlexander MotinAllow disruptive write tests.
85af375c28SEdward Tomasz Napierala.El
86af375c28SEdward Tomasz Napierala.Pp
87a388918dSRuslan ErmilovIf given no arguments, the output will be a single line per specified device
88a362eb63SPoul-Henning Kampwith the following fields: device name, sectorsize, media size in bytes,
89851b967aSAlexander Motinmedia size in sectors, stripe size, stripe offset, firmware cylinders,
90851b967aSAlexander Motinfirmware heads, and firmware sectors.
91a362eb63SPoul-Henning KampThe last three fields are only present if the information is available.
92*e333110dSEugene Grosbein.Sh EXAMPLES
93*e333110dSEugene GrosbeinList first ten (at most)
94*e333110dSEugene Grosbein.Xr da 4
95*e333110dSEugene Grosbeindevices with corresponding serial numbers:
96*e333110dSEugene Grosbein.Pp
97*e333110dSEugene Grosbein.Dl diskinfo -ls /dev/da?
98*e333110dSEugene Grosbein.Sh SEE ALSO
99*e333110dSEugene Grosbein.Xr da 4
100a362eb63SPoul-Henning Kamp.Sh HISTORY
101a388918dSRuslan ErmilovThe
102a362eb63SPoul-Henning Kamp.Nm
103a362eb63SPoul-Henning Kampcommand appeared in
104a388918dSRuslan Ermilov.Fx 5.1 .
10559a3c79dSRuslan Ermilov.Sh AUTHORS
106af375c28SEdward Tomasz NapieralaThe
107af375c28SEdward Tomasz Napierala.Nm
108af375c28SEdward Tomasz Napieralautility was written by
109af375c28SEdward Tomasz Napierala.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .
11059a3c79dSRuslan Ermilov.Sh BUGS
11159a3c79dSRuslan ErmilovThere are in order of increasing severity: lies,
11259a3c79dSRuslan Ermilovdamn lies, statistics, and computer benchmarks.
113