hvrstats - Gather or output statistics information.
hvrstats [-h class] [-u user] -C lett hubdb
hvrstats [-h class] [-u user] -f logf [-f logf]... [-T gran] hubdb
hvrstats [-h class] [-u user] -g N [-T gran] [-G typ] hubdb
hvrstats [-h class] [-u user] -o fname [-outopts] hubdb
hvrstats [-h class] [-u user] -p pol hubdb
Command hvrstats 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 its status tables.
Option -o outputs information from status tables.
|-C letters||Create database objects for hvrstats. Value letters can be one or more of the following:
This option cannot be used with options -g -f -o or -p.
|-f logf||Gather statistics measurements from HVR log file logf. This option can be supplied multiple times. Examples of use are to catchup 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 options -C -g -o or -p.|
|-g bool||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 options -C -f -o or -p.|
|-G letters||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:
|-h class||Hub class, for connecting to hub database.|
|-o fname||Writes statistics information into file fname. The default file format is JSON. To filter the output written into file fname, you can use the output options along with -o.|
|-p policy||Purge old records from table hvr_stats. Value policy can be one of the following:
Values NONE and UNBOUNDED are not allowed here but are valid for action Scheduling /StatsHistory. This option cannot be used with options -C -g -f or -o.
|-T gran||Time granularity of data to gather or to output. Value gran must be only one of the following:
|-u user[/pwd]||Username for hub database.|
The following options (-outopts) can only be used with option -o .
|-b begin_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.|
|-c chn||Only write statistics information for channel chn. This option can be supplied multiple times.|
|-e end_time||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.|
|-l loc||Only write statistics information for location loc. This option can be supplied multiple times.|
|-m mchoice||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.|
|-s scope||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.
|-t tbl||Only write statistics information for table tbl. This option can be supplied multiple times.|
|-V fmt||Format of the output file fname. Value fmt can be one of the following:
|-w time||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 ‘10minutes’ (-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>
|├─ hvrstatistics-stats-hubdb.offset||Statistics state file.|