1.\" $OpenBSD: kstat.1,v 1.2 2024/12/03 07:09:14 jmc Exp $ 2.\" 3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: December 3 2024 $ 18.Dt KSTAT 1 19.Os 20.Sh NAME 21.Nm kstat 22.Nd display kernel statistics 23.Sh SYNOPSIS 24.Nm kstat 25.Op Fl w Ar wait 26.Oo 27.Ar name | 28.Sm off 29.Ar provider : instance : name : unit 30.Sm on 31.Oc 32.Ar ... 33.Sh DESCRIPTION 34The 35.Nm 36utility displays statistics collected by the kernel. 37By default, all available data is displayed. 38If at least one argument is given, the display is restricted to data 39that matches at least one of the arguments. 40.Pp 41The options are as follows: 42.Bl -tag -width provider 43.It Fl w Ar wait 44Show statistics at intervals of 45.Ar wait 46seconds. 47.El 48.Pp 49The components of arguments are as follows: 50.Bl -tag -width provider 51.It Ar provider 52The name of the device providing the statistical data. 53Pattern matching with 54.Xr glob 7 55patterns is supported. 56.It Ar instance 57An unsigned integer number. 58Currently, all statistics use an instance number of 0. 59.It Ar name 60A string identifying the kind of data to be shown. 61Pattern matching with 62.Xr glob 7 63patterns is supported. 64.It Ar unit 65An unsigned integer number, used for example if a network device has 66multiple rings. 67.El 68.Pp 69If an empty string is given for any of the components, 70all values of the respective property are accepted. 71.Pp 72A complete list of four-component arguments supported on the current 73machine can be displayed by calling 74.Nm 75without any argument. 76.Sh FILES 77.Bl -tag -width /dev/kstat 78.It Pa /dev/kstat 79pseudo-device providing kernel statistics 80.El 81.Sh EXIT STATUS 82.Ex -std 83.Sh EXAMPLES 84Show receive queue statistics for all interfaces 85and transmit queue statistics for all 86.Xr em 4 87interfaces: 88.Pp 89.Dl $ kstat rxq em*::txq: 90.Sh SEE ALSO 91.Xr netstat 1 , 92.Xr systat 1 93.\" XXX .Xr kstat 4 -- add this when that page is written 94.Sh HISTORY 95The 96.Nm 97utility first appeared in 98.Ox 6.8 . 99.Sh AUTHORS 100.An David Gwynne Aq Mt dlg@openbsd.org 101