dssstats - DSS 6 | Data Source Solutions Documentation

Documentation: dssstats - DSS 6 | Data Source Solutions Documentation

dssstats

Usage

  • <b>dssstats</b> <b>-C</b><em> hub</em> (Re-)create the dssstats job.
  • <b>dssstats</b> <b>-f</b><em>logf</em> [<b>-T</b><em>timegran_mask</em>] <em>hub</em></code> Gather statistics data from specific log file logf with specific time granularity.
  • <b>dssstats</b> <b>-g</b><em>onceonly</em> [<b>-T</b><em>timegran_mask</em>] [<b>-G</b><em>type</em>] <em>hub</em></code> Gather statistics data into the DSS_STATS repository table with specific time granularity and specific type of information.
  • <b>dssstats</b> <b>-o</b><em>fname</em> [-o<em>utopts</em>] <em>hub</em></code> Fetch statistics data from the DSS_STATS repository table to file fname.
  • <b>dssstats</b> <b>-p</b><em>purge</em><b>_</b><em>pol</em> <em>hub</em></code> Purge data from the DSS_STATS repository table according to purge policy purge_pol.

Description

Command dssstats gathers or outputs statistics information. For more information see, Statistics and Metrics for Statistics.

Regular Options

This section describes the options available for command dssstats.

Parameter Description
-C (Re-)create the dssstats job.
-flogf

Gather statistics measurements from DSS log file logf.

Examples of use are to catch up with the current log file (in DSS_CONFIG/hubs/hub/logs/dss.out) or to consume archived log files (in DSS_CONFIG/hubs/hub/logarchives). This option does not change the statistics offset state file.

This option cannot be used with options -C, -g, -o, or
-p.
-gonceonly

Gather statistics data into the DSS_STATS repository table; normal run-time dssstats processing. Value onceonly should either be 0 (run continuously in a loop until terminated) or 1 (perform just one [full] cycle, then stop).

This option cannot be used with options -C, -f, -o, or
-p.
-Gtype

Type of information to gather.

Valid values for type are:

  • j: job information from router globbing, including latency and log files sizes.
  • s: statistic metrics from live DSS log file

The default is -Gjs. By default, all types of information are gathered (but not at the same frequency).

Requires option -g.
-k Only fetch distinct keys.
-ofname

Fetch statistics data from the DSS_STATS repository table to file fname. The default file format is JSON, for other file formats see output option -V.

To filter the output written into file fname, use the output options along with -o.
-ppurge_pol

Purge statistics data from the DSS_STATS repository table according to purge policy.

Valid values for purge_pol are:

  • SMALL: Per-table measurements at 1min/10 min/1hour/1day granularity are purged after 1hour/4hours/1day/7days respectively. Rows for all tables (table=*) at 1min/10 min/1hour/1day granularity are purged after 4hours/1day/7days/30days respectively.
  • MEDIUM default: Per-table measurements at 1min/10 min/1hour/1day granularity are purged after 4hours/1day/7days/30days respectively. Rows for all tables (table=*) at 1min/10min/1hour/1day granularity are purged after 1day/7days/30days/never respectively.
  • LARGE: Per-table measurements at 1min/10min/1hour/1day granularity are purged after 1day/7days/30days/never respectively. Rows for all tables (table=*) at 1min/10min/1hour/1day granularity are purged after 7days/30days/never/never respectively.
This option cannot be used with options -C, -g, -f, or -o.
-Ttimegran_mask

Only fetch data for specific time granularity.

Valid values for timegran_mask are:

  • m: Minute granularity
  • t: Ten (10) minutes granularity
  • h: Hour granularity
  • d: Day granularity
  • c: Current granularity. This letter is allowed with option -o (view output), not option -g (gather from runtime).

The default is to run all time granularities (-T mthd).

This option can only be used with options -f (gather from file), -g (gather from runtime), or -o (view output).

When gathering (option -g) if this option is omitted, the default is m (minute granularity). Also, when gathering (but not when showing) if a small granularity is supplied, then large granularities (e.g. m > t > h > d) will also be calculated. For example, if option -T t (for 10 minutes) is supplied, then aggregate values are also calculated for an hour and day granularity. With option -o (view output), multiple letters can be supplied.

Output Options

The following options (-outopts) can only be used with option <b>-o</b>.

Parameter Description
-bbegin_time

Only write statistics information since begin_time. Value begin_time must have one of the following forms:

  • YYYY-MM-DD HH:MM:SS
  • YYYY-MM-DDTHH:MM:SS+TZD
  • YYYY-MM-DDTHH:MM:SSZ
-cchn Only write statistics information for channel chn. This option can be supplied multiple times.
-eend_time

Only write statistics information up to end_time. Value end_time must have one of the following forms:

  • YYYY-MM-DD HH:MM:SS
  • YYYY-MM-DDTHH:MM:SS+TZD
  • YYYY-MM-DDTHH:MM:SSZ
-lloc Only write statistics information for location loc. This option can be supplied multiple times.
-mmchoice Only write statistics information for specific metrics. Values mchoice can be either a metric name (e.g. Integrated Updates), a group of metrics (e.g. Latency) or a named label of metrics (__kpi_lines). This option can be supplied multiple times; if it is not supplied then all metrics are displayed.
-sscope

Only write statistics information for metric with specific scope.

A scope is identified by three letters for channel (c), location (l), and table (t). The first letter of scope is either c if the value is for a specific channel, or * if it is associated (an aggregate) with all channels. The second is either l if the value is for a specific location or * if it is associated (an aggregate) with all locations. The third is either t if the value is for a specific table or * if it is associated (an aggregate) with all tables.

Value scope must be one of the following:

  • clt: Specific (named) channel, location and table.
  • cl*: Specific channel and location, but for all tables (e.g. table=*).
  • c*t: Specific channel and table, but for all locations.
  • *l*: Specific locations, but for all channels and tables.
  • c**: Specific channel, but for all locations and tables.
  • ***: General values, which apply to all channels, locations and tables.
If this option is not supplied, then measurements for all scope are shown. This option can be supplied multiple times.


cl* *l*





clt

***






c*t c**

Note that two combinations (*lt and **t) are not supported.

-ttbl Only write statistics information for table tbl. This option can be supplied multiple times.
-Vfmt

Format of the output file fname.

Value fmt can be one of the following:

  • json default : This format is available only in CLI.
  • csv
  • xlsx
-wwaitpoint

Only write statistics information that was updated after waitpoint.

Value waitpoint must have one of the following forms:

  • YYYY-MM-DD HH:MM:SS
  • YYYY-MM-DDTHH:MM:SS+TZD
  • YYYY-MM-DDTHH:MM:SSZ

Examples

This following command creates the DSS_STATS repository tables (if necessary), gather all data from a log file (<b>-f</b><em>logf</em>), select data for time granularity '10 minutes' (<b>-Tt</b>) into a file (<b>-o</b><em>fname</em>) and purge (<b>-p</b>) old rows according to the <b>SMALL</b> purge policy. Note that these actions will be performed in that exact order.

dssstats -Ct -f<em>logf</em> -o<em>fname</em> -Tt -pSMALL <em>hub</em>