Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (8966 KB)
kstat(1M)Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Files | Attributes | See Also | Notes Name
Synopsis
kstat [-lpq] [-T u | d ] [-c class] [-m module]
[-i instance] [-n name] [-s statistic]
[interval [count]]
kstat [-lpq] [-T u | d ] [-c class]
[module:instance:name:statistic]...
[interval [count]]
DescriptionThe kstat utility examines the available kernel statistics, or kstats, on the system and reports those statistics which match the criteria specified on the command line. Each matching statistic is printed with its module, instance, and name fields, as well as its actual value. Kernel statistics may be published by various kernel subsystems, such as drivers or loadable modules; each kstat has a module field that denotes its publisher. Since each module might have countable entities (such as multiple disks associated with the sd(7D) driver) for which it wishes to report statistics, the kstat also has an instance field to index the statistics for each entity; kstat instances are numbered starting from zero. Finally, the kstat is given a name unique within its module. Each kstat may be a special kstat type, an array of name-value pairs, or raw data. In the name-value case, each reported value is given a label, which we refer to as the statistic. Known raw and special kstats are given statistic labels for each of their values by kstat; thus, all published values can be referenced as module:instance:name:statistic. When invoked without any module operands or options, kstat will match all defined statistics on the system. Example invocations are provided below. All times are displayed as fractional seconds since system boot. Options
The tests specified by the following options are logically ANDed, and all matching kstats will be selected. A regular expression containing shell metacharacters must be protected from the shell by enclosing it with the appropriate quotes. The argument for the -c, -i, -m, -n, and -s options may be specified as a shell glob pattern, or a Perl regular expression enclosed in '/' characters. Operands
The following operands are supported: ExamplesIn the following examples, all the command lines in a block produce the same output, as shown immediately below. The exact statistics and values will of course vary from machine to machine. Example 1 Using the kstat Command
Example 2 Using the kstat Command
Example 3 Using the kstat Command
Example 4 Using the kstat Command
Example 5 Using the kstat Command
Example 6 Using the kstat Command
Exit Status
The following exit values are returned: FilesAttributesSee attributes(5) for descriptions of the following attributes:
See AlsoNotesIf the pattern argument contains glob or Perl RE metacharacters which are also shell metacharacters, it will be necessary to enclose the pattern with appropriate shell quotes. Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Files | Attributes | See Also | Notes |
||||||||||