Table of ContentsView in Frames

Collecting system information with the stats command in background mode

You can collect system information from a specified set of counters over time in the background.

About this task

The stats start and stats stop commands enable you to collect information from a specified set of counters over time in the background. The information collected is averaged over the period and displayed when the stats stop command is issued. You can initiate multiple stats commands in background mode, giving each of them a name so you can control them individually.
Note: Each instance of a stats command consumes a small amount of system resources. If you start a large number of stats commands in background mode, you could affect overall storage system performance. To avoid this issue, Data ONTAP does not allow you to start more than 50 background stats commands, to keep stats commands from consuming too many system resources. If you already have 50 background stats commands running, you must stop at least one before you can start more. To stop all currently running stats commands, you can use the stats stop -a command.

See the na_stats_preset(5) man page for a list of options.

Steps

  1. Enter the following command to start collecting system information:
    stats start [-I identifier] object_def [object_def...]

    If you are running only one background stats command, you can omit the -I parameter.

    identifier names this instance of the stats command so you can refer to it later to show results. If you are running only one background stats command, you can omit this parameter.

    object_def is the name of the object.

  2. If you want to display interim results without stopping the background stats command, enter the following command:
    stats show [-I identifier]

    identifier names the instance of the stats command you want to display interim results for. If you are running only one background stats command, you can omit this parameter.

  3. Enter the following command to stop data collection and display the final results:
    stats stop [-I identifier]

    identifier names the instance of the stats command you want to stop and display results for. If you are running only one background stats command, you can omit this parameter.

    To filter the output of a background stats command initiated with a stats start command, add -O name=value to the stats stop command, where name is the name of the option you want to omit from the output and the value is on or off.

    Example

    The following command filters out all the statistics with zero counter values:

    stats stop [-I identifier] -O print_zero_values=off