Print this page
749 "/usr/bin/kstat" should be rewritten in C
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Brendan Gregg <brendan.gregg@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1m/kstat.1m
          +++ new/usr/src/man/man1m/kstat.1m
   1    1  '\" te
   2    2  .\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
   3    3  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   4    4  .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
   5    5  .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH KSTAT 1M "Mar 23, 2009"
        6 +.TH KSTAT 1M "Jan 9, 2013"
   7    7  .SH NAME
   8    8  kstat \- display kernel statistics
   9    9  .SH SYNOPSIS
  10   10  .LP
  11   11  .nf
  12      -\fBkstat\fR [\fB-lpq\fR] [\fB-T\fR u | d ] [\fB-c\fR \fIclass\fR] [\fB-m\fR \fImodule\fR]
       12 +\fBkstat\fR [\fB-Cjlpq\fR] [\fB-T\fR u | d ] [\fB-c\fR \fIclass\fR] [\fB-m\fR \fImodule\fR]
  13   13       [\fB-i\fR \fIinstance\fR] [\fB-n\fR \fIname\fR] [\fB-s\fR \fIstatistic\fR]
  14   14       [interval [count]]
  15   15  .fi
  16   16  
  17   17  .LP
  18   18  .nf
  19      -\fBkstat\fR [\fB-lpq\fR] [\fB-T\fR u | d ] [\fB-c\fR \fIclass\fR]
       19 +\fBkstat\fR [\fB-Cjlpq\fR] [\fB-T\fR u | d ] [\fB-c\fR \fIclass\fR]
  20   20       [\fImodule\fR:\fIinstance\fR:\fIname\fR:\fIstatistic\fR]...
  21   21       [interval [count]]
  22   22  .fi
  23   23  
  24   24  .SH DESCRIPTION
  25   25  .sp
  26   26  .LP
  27   27  The \fBkstat\fR utility examines the available kernel statistics, or kstats, on
  28   28  the system and reports those statistics which match the criteria specified on
  29   29  the command line. Each matching statistic is printed with its module, instance,
↓ open down ↓ 22 lines elided ↑ open up ↑
  52   52  .SH OPTIONS
  53   53  .sp
  54   54  .LP
  55   55  The tests specified by the following options are logically ANDed, and all
  56   56  matching kstats will be selected. A regular expression containing shell
  57   57  metacharacters must be protected from the shell by enclosing it with the
  58   58  appropriate quotes.
  59   59  .sp
  60   60  .LP
  61   61  The argument for the \fB-c\fR, \fB-i\fR, \fB-m\fR, \fB-n\fR, and \fB-s\fR
  62      -options may be specified as a shell glob pattern, or a Perl regular expression
       62 +options may be specified as a shell glob pattern, or a regular expression
  63   63  enclosed in '/' characters.
  64   64  .sp
  65   65  .ne 2
  66   66  .na
       67 +\fB\fB-C\fR\fR
       68 +.ad
       69 +.RS 16n
       70 +Displays output in parseable format with a colon as separator.
       71 +.RE
       72 +
       73 +.sp
       74 +.ne 2
       75 +.na
  67   76  \fB\fB-c\fR \fIclass\fR\fR
  68   77  .ad
  69   78  .RS 16n
  70   79  Displays only kstats that match the specified class. \fIclass\fR is a
  71   80  kernel-defined string which classifies the "type" of the kstat.
  72   81  .RE
  73   82  
  74   83  .sp
  75   84  .ne 2
  76   85  .na
  77   86  \fB\fB-i\fR \fIinstance\fR\fR
  78   87  .ad
  79   88  .RS 16n
  80   89  Displays only kstats that match the specified instance.
  81   90  .RE
  82   91  
  83   92  .sp
  84   93  .ne 2
  85   94  .na
       95 +\fB\fB-j\fR\fR
       96 +.ad
       97 +.RS 16n
       98 +Displays output in JSON format.
       99 +.RE
      100 +
      101 +.sp
      102 +.ne 2
      103 +.na
  86  104  \fB\fB-l\fR\fR
  87  105  .ad
  88  106  .RS 16n
  89  107  Lists matching kstat names without displaying values.
  90  108  .RE
  91  109  
  92  110  .sp
  93  111  .ne 2
  94  112  .na
  95  113  \fB\fB-m\fR \fImodule\fR\fR
↓ open down ↓ 58 lines elided ↑ open up ↑
 154  172  The following operands are supported:
 155  173  .sp
 156  174  .ne 2
 157  175  .na
 158  176  \fB\fImodule\fR:\fIinstance\fR:\fIname\fR:\fIstatistic\fR\fR
 159  177  .ad
 160  178  .sp .6
 161  179  .RS 4n
 162  180  Alternate method of specifying module, instance, name, and statistic as
 163  181  described above. Each of the module, instance, name, or statistic specifiers
 164      -may be a shell glob pattern or a Perl regular expression enclosed by '/'
      182 +may be a shell glob pattern or a regular expression enclosed by '/'
 165  183  characters. It is possible to use both specifier types within a single operand.
 166  184  Leaving a specifier empty is equivalent to using the '*' glob pattern for that
 167  185  specifier.
 168  186  .RE
 169  187  
 170  188  .sp
 171  189  .ne 2
 172  190  .na
 173  191  \fB\fIinterval\fR\fR
 174  192  .ad
↓ open down ↓ 185 lines elided ↑ open up ↑
 360  378  
 361  379  .SH SEE ALSO
 362  380  .sp
 363  381  .LP
 364  382  \fBdate\fR(1), \fBsh\fR(1), \fBtime\fR(2), \fBgmatch\fR(3GEN),
 365  383  \fBkstat\fR(3KSTAT), \fBattributes\fR(5), \fBkstat\fR(7D), \fBsd\fR(7D),
 366  384  \fBkstat\fR(9S)
 367  385  .SH NOTES
 368  386  .sp
 369  387  .LP
 370      -If the pattern argument contains glob or Perl RE metacharacters which are also
      388 +If the pattern argument contains glob or RE metacharacters which are also
 371  389  shell metacharacters, it will be necessary to enclose the pattern with
 372  390  appropriate shell quotes.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX