xref: /freebsd/sys/contrib/openzfs/man/man1/zilstat.1 (revision 80aae8a3f8aa70712930664572be9e6885dc0be7)
1.\" SPDX-License-Identifier: CDDL-1.0
2.\"
3.\" CDDL HEADER START
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License, Version 1.0 only
7.\" (the "License").  You may not use this file except in compliance
8.\" with the License.
9.\"
10.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11.\" or https://opensource.org/licenses/CDDL-1.0.
12.\" See the License for the specific language governing permissions
13.\" and limitations under the License.
14.\"
15.\" When distributing Covered Code, include this CDDL HEADER in each
16.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17.\" If applicable, add the following below this CDDL HEADER, with the
18.\" fields enclosed by brackets "[]" replaced with your own identifying
19.\" information: Portions Copyright [yyyy] [name of copyright owner]
20.\"
21.\" CDDL HEADER END
22.\"
23.\" Copyright (c) 2026 Christos Longros.  All rights reserved.
24.\"
25.Dd March 9, 2026
26.Dt ZILSTAT 1
27.Os
28.
29.Sh NAME
30.Nm zilstat
31.Nd report ZFS Intent Log statistics
32.Sh SYNOPSIS
33.Nm
34.Op Fl v
35.Op Fl a Ns | Ns Fl p Ar pool Ns | Ns Fl d Ar dataset Ns Op , Ns Ar dataset Ns …
36.Op Fl f Ar field Ns Op , Ns Ar field Ns …
37.Op Fl s Ar separator
38.Op Fl i Ar interval
39.
40.Sh DESCRIPTION
41.Nm
42prints statistics about the ZFS Intent Log (ZIL).
43The ZIL is used to log synchronous write operations and is replayed on
44pool import if the system crashes before those writes are committed to
45the main pool.
46.Pp
47By default, global ZIL statistics are displayed.
48When a pool or dataset is specified, per-dataset statistics are shown
49instead.
50.Pp
51If an
52.Ar interval
53is specified, the output is repeated every
54.Ar interval
55seconds showing the change in values since the previous sample.
56Without an interval, cumulative values are displayed.
57.Pp
58The following fields are available:
59.Bl -tag -compact -offset Ds -width "imnw"
60.It Sy time
61Current time
62.It Sy pool
63Pool name
64.It Sy ds
65Dataset name
66.It Sy obj
67Objset ID
68.It Sy cc
69Commit count
70.It Sy cwc
71Commit writer count
72.It Sy cec
73Commit error count
74.It Sy csc
75Commit stall count
76.It Sy cSc
77Commit suspend count
78.It Sy cCc
79Commit crash count
80.It Sy ic
81In-transaction count
82.It Sy iic
83Indirect in-transaction count
84.It Sy iib
85Indirect in-transaction bytes
86.It Sy icc
87Copied in-transaction count
88.It Sy icb
89Copied in-transaction bytes
90.It Sy inc
91Needcopy in-transaction count
92.It Sy inb
93Needcopy in-transaction bytes
94.It Sy idc
95Direct (copied + needcopy) count
96.It Sy idb
97Direct (copied + needcopy) bytes
98.It Sy iwc
99Total write (indirect + direct) count
100.It Sy iwb
101Total write (indirect + direct) bytes
102.It Sy imnc
103Normal metaslab count
104.It Sy imnb
105Normal metaslab bytes
106.It Sy imnw
107Normal metaslab write bytes
108.It Sy imna
109Normal metaslab alloc bytes
110.It Sy imsc
111SLOG metaslab count
112.It Sy imsb
113SLOG metaslab bytes
114.It Sy imsw
115SLOG metaslab write bytes
116.It Sy imsa
117SLOG metaslab alloc bytes
118.It Sy imc
119Total metaslab (normal + SLOG) count
120.It Sy imb
121Total metaslab (normal + SLOG) bytes
122.It Sy imw
123Total metaslab (normal + SLOG) write bytes
124.It Sy ima
125Total metaslab (normal + SLOG) alloc bytes
126.It Sy se%
127Space efficiency percentage (bytes / alloc)
128.It Sy sen%
129Normal space efficiency percentage
130.It Sy ses%
131SLOG space efficiency percentage
132.It Sy te%
133Total efficiency percentage (bytes / write)
134.It Sy ten%
135Normal total efficiency percentage
136.It Sy tes%
137SLOG total efficiency percentage
138.El
139.
140.Sh OPTIONS
141.Bl -tag -width "-s"
142.It Fl h
143Display a help message.
144.It Fl a
145Print statistics for all datasets across all pools.
146.It Fl d Ar dataset
147Print statistics for the specified dataset(s).
148Multiple datasets may be given as a comma-separated list.
149.It Fl f Ar field
150Display only the specified fields.
151Multiple fields may be given as a comma-separated list.
152See
153.Sx DESCRIPTION
154for available fields.
155.It Fl i Ar interval
156Print statistics every
157.Ar interval
158seconds.
159Values are reported as rates per second.
160.It Fl p Ar pool
161Print statistics for all datasets in the specified pool.
162.It Fl s Ar separator
163Override the default field separator
164.Pq two spaces
165with a custom string.
166.It Fl v
167List all available field headers and their definitions.
168.El
169.
170.Sh ENVIRONMENT
171.Bl -tag -width "Linux"
172.It Sy Linux
173Statistics are read from
174.Pa /proc/spl/kstat/zfs/zil
175for global stats and from per-pool objset files under
176.Pa /proc/spl/kstat/zfs/ Ns Ar pool Ns Pa / .
177.It Sy FreeBSD
178Statistics are read via
179.Xr sysctl 8
180from the
181.Sy kstat.zfs
182tree.
183.El
184.
185.Sh SEE ALSO
186.Xr zarcstat 1 ,
187.Xr zpool-status 8
188.
189.Sh AUTHORS
190This manual page was written by
191.An Christos Longros Aq Mt chris.longros@gmail.com .
192