KSTAT(1) | General Commands Manual | KSTAT(1)

# NAME

`kstat` — display kernel statistics

# SYNOPSIS

`kstat` | [`-w` wait] [name | provider:instance:name:unit] ...

# DESCRIPTION

The `kstat` utility displays statistics collected by the kernel. By default, all available data is displayed. If at least one argument is given, the display is restricted to data that matches at least one of the arguments.

The options are as follows:

`-w` wait
  Show statistics at intervals of wait seconds.

The components of arguments are as follows:

provider
  The name of the device providing the statistical data. Pattern matching with glob(7) patterns is supported.
instance
  An unsigned integer number. Currently, all statistics use an instance number of 0.
name
  A string identifying the kind of data to be shown. Pattern matching with glob(7) patterns is supported.
unit
  An unsigned integer number, used for example if a network device has multiple rings.

If an empty string is given for any of the components, all values of the respective property are accepted.

A complete list of four-component arguments supported on the current machine can be displayed by calling `kstat` without any argument.

# FILES

/dev/kstat
  pseudo-device providing kernel statistics

# EXIT STATUS

The `kstat` utility exits 0 on success, and >0 if an error occurs.

# EXAMPLES

Show receive queue statistics for all interfaces and transmit queue statistics for all em(4) interfaces:

`$ kstat rxq em*::txq:`

# SEE ALSO

netstat(1), systat(1)

# HISTORY

The `kstat` utility first appeared in OpenBSD 6.8.

# AUTHORS

David Gwynne <dlg@openbsd.org>

December 3, 2024 | Debian