Hvrstats
Since v5.3.1/25
Name
hvrstats - Gather or output statistics information.
Statistics generation for HVR version 5.3.1/24 and older, see Hvrstatistics.
Synopsis
hvrstats [-h class] [-u user] -Clett hubdb
hvrstats [-h class] [-u user] -flogf [-flogf]... [-Tgran] hubdb
hvrstats [-h class] [-u user] -gN [-Tgran] [-Gtyp] hubdb
hvrstats [-h class] [-u user] -ofname [-outopts] hubdb
hvrstats [-h class] [-u user] -ppol hubdb
Description
Command hvrstats gathers or outputs statistics information.
The argument hubdb specifies the connection to the hub database. For more information about supported hub databases and the syntax for using this argument, see Calling HVR on the Command Line.
This command can be invoked in five distinct ways:
- Option -C creates database objects.
- Option -f gathers statistics information from a static log file.
- Option -g gathers live information into table hvr_stats.
- Option -o outputs statistics information from table hvr_stats to a file.
- Option -p purges old data from table hvr_stats.
Regular Options
Parameter | Description |
---|---|
-Cletters | Create database objects for hvrstats. Value letters can be one or more of the following:
|
-flogf | Gather statistics measurements from HVR log file logf. This option can be supplied multiple times. Examples of use are to catch-up with the current log file ($HVR_CONFIG/log/hubdb.out) or to consume archived log files (in $HVR_CONFIG/logarchive) . This option does not change the statistics offset state file. This option cannot be used with -C -g -o or -p. |
-gbool | Gather information from runtime; normal run-time hvrstats processing. Value bool 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 -C -f -o or -p. |
-Gletters | Type of information to gather. By default all types of information is gathered (but not at same frequency). Value letters can one of the following:
|
-hclass | Location class of the hub database. Valid values for class are db2, db2i, ingres, mysql, oracle, postgresql, sqlserver, or teradata. For more information, see Calling HVR on the Command Line. |
-ofname | Writes statistics information (fetched from table hvr_stats) into file fname. The default file format is JSON, for other file formats see output option-V. To filter the output written into file fname, you can use the output options along with -o. |
-ppolicy | Purge old records immediately from the catalog tablehvr_stats. Value policy can be one of the following:
|
-Tgran | Time granularity of data to gather or to output. Value gran must be only one of the following:
This option can only be used with -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 for option -T t (for 10 minutes) is supplied then aggregate values are also calculated for hour and day granularity. With option -o(view output), multiple letters can be supplied and the default is to return all time granularities (-T mthd). |
-uuser[/pwd] | Username for hub database. |
Output Options
The following options (-outopts) can only be used with option -o.
For list of all statistics metrics, see Metrics for Statistics.
Parameter | Description |
---|---|
-bbegin_time | Only write statistics information since begin_time. Value begin_time must have form YYYY-MM-DD HH:MM:SS, YYYY-MM-DDTHH:MM:SS+TZD or 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 form YYYY-MM-DD HH:MM:SS, YYYY-MM-DDTHH:MM:SS+TZD or 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, location and table The first letter of scope is either c if the value is for a specific channel or * if it is associated (an aggregate) for all channels. The second is either l if the value is for a specific location or * if it is associated (an aggregate) for all locations. The third is either t if the value is for a specific table or * if it is associated (an aggregate) for all tables. Value scope must be one of the following:
If this option is not supplied then measurements for all scope are shown. This option can be supplied multiple times. 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:
|
-wtime | Only write statistics information that was updated after time. Value time must have form YYYY-MM-DD HH:MM:SS, YYYY-MM-DDTHH:MM:SS+TZD or YYYY-MM-DDTHH:MM:SSZ. |