hvrstats
Usage
hvrstats -C hub
(Re-)create the hvrstats job.hvrstats -flogf [-Ttimegran_mask] hub</code>
Gather statistics data from specific log file logf with specific time granularity.hvrstats -gonceonly [-Ttimegran_mask] [-Gtype] hub</code>
Gather statistics data into the HVR_STATS repository table with specific time granularity and specific type of information.hvrstats -ofname [-outopts] hub</code>
Fetch statistics data from the HVR_STATS repository table to file fname.hvrstats -ppurge_pol hub</code>
Purge data from the HVR_STATS repository table according to purge policy purge_pol.
Description
Command hvrstats gathers or outputs statistics information. For more information see, Statistics and Metrics for Statistics.
Regular Options
This section describes the options available for command hvrstats.
Parameter | Description |
---|---|
-C | (Re-)create the hvrstats job. |
-flogf | Gather statistics measurements from HVR log file logf. Examples of use are to catch up with the current log file (in HVR_CONFIG/hubs/hub/logs/hvr.out) or to consume archived log files (in HVR_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 HVR_STATS repository table; normal run-time hvrstats 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
The default is -g . |
-k | Only fetch distinct keys. |
-ofname | Fetch statistics data from the HVR_STATS repository table to file fname. The default file format is JSON, for other file formats see output option -o . |
-ppurge_pol | Purge statistics data from the HVR_STATS repository table according to purge policy. Valid values for
-C , -g , -f , or -o . |
-Ttimegran_mask | Only fetch data for specific time granularity. Valid values for
The default is to run all time granularities ( This option can only be used with options -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 -o
.
Parameter | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-bbegin_time | Only write statistics information since begin_time. Value begin_time must have one of the following forms:
| |||||||||||||||||||||||||||||||||||
-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:
| |||||||||||||||||||||||||||||||||||
-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 ( Value scope must be one of the following:
Note that two combinations ( | |||||||||||||||||||||||||||||||||||
-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:
| |||||||||||||||||||||||||||||||||||
-wwaitpoint | Only write statistics information that was updated after waitpoint. Value waitpoint must have one of the following forms:
|
Examples
This following command creates the HVR_STATS repository tables (if necessary), gather all data from a log file (-flogf
), select data for time granularity '10 minutes' (-Tt
) into a file (-ofname
) and purge (-p
) old rows according to the SMALL
purge policy. Note that these actions will be performed in that exact order.
hvrstats -Ct -flogf -ofname -Tt -pSMALL hub