The stats command may be run in one of three ways:
a. Singleton, in which current counter values are displayed as a snapshot. (stats show)
b. Repeating, in which counter values are displayed multiple times at a fixed interval. (stats show -i)
c. Period, in which counters are gathered over a single period of time and then displayed (stats start/stats stop). Intermediate results may also be shown, by using stats show.
Displays the names of objects active in the system for which data is available . If -p is specified the objects used by the preset preset will be listed.
stats list instances [-p preset] | [ object_name ]
Display the list of active instance names for a given object, or if -p is specified the instances used by the preset preset. If neither -p nor object_name is specified then all instances for all objects are listed.
stats list counters [-p preset] | [ object_name ]
Display the list of all counters associated with an object, or if -p is specified the counters used by the preset preset. If neither -p nor object_name is specified then all counters for all objects are listed.
stats explain counters [ object_name [ counter_name ] ]
Displays an explanation for specific counter(s) in the specified object, or all counters in all objects if no object_name or counter_name are given.
stats show [ -n num ] [ -i interval ] [ -o path ] [ -d delimiter ] [ -p preset ] -O option=value{,option=value} ] [ -r | -c ] [ -I identifier | object_def [ object_def ...] ]
Shows all or selected statistics in various formats. If neither -i nor -I options are used a single 1-second snapshot of statistics will be used. If -i (interval) is used then statistics will be output repeatedly at the specified interval. If -I (identifier) is used, where the identifier is a valid name used with stats start, then the statistics since the stats start will be displayed.
print_units indicates whether or not to print counter units. Default: on.
catenate_instances indicates whether or not each instance should be printed on a separate line or not when performing column output. Default: off
Indicates that statistics collection should begin at the current point in time. This subcommand must be used before the stats stop subcommand. The choice of objects/instance/counters to be monitored is specified with the start subcommand, not with the stop subcommand. If identifier is already in use then that identifier will be reused (the old statistics associated with the identifier is discarded). See the description for stats show for information on the -p and -I options.
stats stop [-p preset] [-I identifier] [-r] [-c] [-o path_name] [-d delimiter] [-O option=value[,...]] [-a]
Causes statistics collection to end at this point in time, and output is displayed on the appliance console or redirected to the file specified.
If multiple stats start commands are concurrently running, with different identifiers, then -I identifier should be used to indicate which command should be stopped. If no identifier is given then the most recent stats start command will be used.
If the -a (all) option is used then all background requests will be stopped and the output discarded.
See the description for stats show for a description of other options.
An object definition (object_def) is one of the following:
A single "*" means all counters in all instances of all objects.
object_name A given object_name includes all counters in all instances of a specific object.
object_name:instance_name A given instance_name of a given object_name includes all counters in the specific instance of the object.
object_name:instance_name:counter_name: A given counter_name of a given object_name specific instance. Use the instance_name "*" to mean counters in all instances of the given object.
Note that instance names may contain spaces, in which case the object definition string should be quoted. If an instance name contains the separator character ":" then it must be dereferenced by using it twice, for example an instance name "my:name" should be given as "my::name"
If an instance and/or counter is specified more than once, for example on the command line and in a preset, then only the first occurance will be displayed in output.
stats show -p my_preset_file
Each preset is stored in a file in the /etc/stats/preset appliance directory.
If command line arguments are given in addition to a preset, then the command line argument takes precedence over the preset value. Object definitions may be given both on the command line and in a preset file. In this case the two sets of defintions are merged into a single set of statistics to display.
See na_stats_preset(5) for a description of the preset file format.
filer*> stats show -i 1 -n 10 system:system:cpu_busy
Instance cpu_busy
%
system 23%
system 22%
system 22%
...
Gather all system statistics over a 60 second interval. The command does not return a filer prompt until the output is written to the stats.out file.
filer*> stats show -i 60 -n 1 -o /measure/stats.out system
List all available counters for the processor object.
filer*> stats list counters processor
Counters for object name: processor
processor_busy
Explain the user_writes counter in the disk object.
filer*> stats explain counters disk user_writes
Counters for object name: disk
Name: user_writes
Description: Number of disk write operations initiated each second for storing data associated with user requests
Properties: rate
Unit: per_sec
Start system statistics gathering in the background, using identifier "MyStats", display the values while gathering continues, then stop gathering and display final values:
filer*> stats start -I MyStats system
filer*>
filer*> stats show -I MyStats
system:system:nfs_ops:2788
system:system:cifs_ops:1390
system:system:http_ops:0
...
filer*>
filer*> stats stop -I MyStats
system:system:nfs_ops:3001
system:system:cifs_ops:5617
system:system:http_ops:0
...
stats show -O print_zero_values=false system
FILES
/etc/stats/preset
Location of preset description files.
SEE ALSO
na_stats_preset (5)
LIMITATIONS
Individual counters may be zero, one or two dimensional.
That is, a single value, a vector or an array may be asso-
ciated with a counter. (The dimensions of a specific
counter may be viewed using the stats explain counters
subcommand.) Display of counters that are 1- or 2-dimen-
sional is peformed as a list or grid, which is better
viewed using row format.
When using column format (-c) or the default interval (-i)
format, each line of output is a single instance, with the
column data being formed from the data in multiple
instances and/or iterations. It is assumed that all
instances have the same counters selected for display. If
this is not true, for example multiple objects are
selected, or specific instances of the same object are
chosen with different counters, then the output will be
formatted using multiple lines, potentially with different
counter types in the same column position.
In this case it may be appropriate to either specify row
format (-r), or catentate all instances/objects together
into a single line, for example: _NF_NF_
filer*> stats show -i 1 -r
ifnet:e0:recv_packects ifnet:e4:send_packets
ifnet:e1:recv_packets:1000/s
ifnet:e4:send_packets:7799/s
ifnet:e1:recv_packets:2040/s
ifnet:e4:send_packets:1799/s
ifnet:e1:recv_packets:2340/s
ifnet:e4:send_packets:799/s
filer*> stats show -i 1 -O catenate_instances=on
ifnet:e0:recv_packects ifnet:e4:send_packets
Instance recv_packets Instance send_packets
/s /s
e0 1000 e4 7799
e0 2040 e4 1799
e0 2340 e4 799
Copyright © 1994-2007 Network Appliance. Legal Information