hvrstats - Gather or output statistics information.
Statistics generation for HVR version 5.3.1/24 and older, see Hvrstatistics.
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
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.
Create database objects for hvrstats. Value letters can be one or more of the following:
This option cannot be used with -g -f -o or -p.
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.
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.
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:
This option requires option -g (gather). If this option is not supplied then all types of information is gathered (-Gjs).
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.
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.
Values NONE and UNBOUNDED are not allowed here but are valid for action Scheduling /StatsHistory. This option cannot be used with -C -g -f or -o.
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).
Username for hub database.
The following options (-outopts) can only be used with option -o.
For list of all statistics metrics, see Metrics for Statistics.
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.
Only write statistics information for channel chn. This option can be supplied multiple times.
Only write statistics information upto 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.
Only write statistics information for location loc. This option can be supplied multiple times.
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.
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.
Only write statistics information for table tbl. This option can be supplied multiple times.
Format of the output file fname. Value fmt can be one of the following:
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.
This command will create the hvrstats catalog tables (if necessary), gather all data from a log file (-f <hvr_log>), select data for time granularity '10 minutes' (-Tt) into a file (-o <ofile>) and purge (-p) old rows according to the SMALL purge policy. Note that these actions will be performed in that exact order.
hvrstats -Ct -f <hvr_log> -o <ofile> -Tt -pSMALL <hub_db>
|Statistics state file.|