Hvrstatistics
Name
hvrstatistics - Extract statistics from HVR scheduler logfiles.
Since HVR 5.3.1/25, hvrstatistics is replaced with Hvrstats.
Synopsis
hvrstatistics [-options]... [hubdb]
Description
hvrstatistics displays the statistics from HVR scheduler logfiles. The first argument hubdb specifies the connection to the hub database. For more information about supported hub databases, see Calling HVR on the Command Line.
hvrstatistics cannot process files containing more than 12 months of data.
Options
This section describes the options available for command hvrstatistics.
Parameter | Description |
---|---|
-btime | Only lines after (begin) time. Argument must have one of the following formats YYYY-MM-DD HH:MI:SS or YYYY-MM-DDTHH:MM:SS+TZD or YYYY-MM-DDTHH:MM:SSZ. |
-cchn | Only parse output for specific channel chn. Alternatively, a specific channel can be omitted using form -c!chn. This option can be specified multiple times. |
-etime | Only lines until (end) time. Argument must have one of the following formats YYYY-MM-DD HH:MI:SS or YYYY-MM-DDTHH:MM:SS+TZD or YYYY-MM-DDTHH:MM:SSZ. |
-ffile | Parse scheduler log file file, instead of default $HVR_CONFIG/log/hubdb/hvr.out. |
-gcol | Summarize totals grouped by col which can be either channel, location, job, table, year, month, day, hour, minute or second. This option can be specified multiple times, which will subdivide the results by each column. Additionally, a reasonable subdivision of time-based columns can be specified, e.g.: -s "10 minutes" or -s "6 hours" |
-i | Incremental. Only lines added since previous run of hvrstatistics. The position of the last run is stored in file $HVR_CONFIG/files/hvrstatistics.offset. |
-Iname | Incremental with variable status file. Only lines added since previous run of hvrstatistics. The position of the last run is stored in file $HVR_CONFIG/files/hvrstatistics_name.offset. |
-lloc | Only parse output for specific location loc. Alternatively, a specific location can be omitted using form -l!loc. This option can be specified multiple times. |
-r | Resilient. Do not show log file output lines which cannot be matched. |
-ssep | Print parsed output in CSV-matrix with field separator sep. This allows the input to be imported into a spreadsheet. |
-Scol | Summarize totals grouped by col which can be either channel, location, job, table, year, month, day, hour, minute or second. This option can be specified multiple times, which will cause the same data to be repeated in multiple blocks, but with each block divided by a different column. |
-v | Verbose trace messages. |
For list of all statistics metrics, see Metrics for Statistics.
Examples
HVR Statistics can be run from inside the HVR GUI, or it can be run on the command line. The following screenshot shows an example of the HVR Statistics inside the GUI.
On the command line, to count total rows replicated for each location and table, use the following:
hvrstatistics -g location -g table myhub
Sample output:
Location cen Table order Captured rows : 25 Table product Captured rows : 100 Capture cycles : 6 Routed bytes : 12053 Location dec01 Table order Integrated updates : 25 Integrated changes : 25 Table product Integrated updates : 100 Integrated changes : 100 Integrate cycles : 7 Integrate transactions : 4
To create a CSV file with the same data use option -s as follows:
hvrstatistics -g location -g table -s"," myhub > stats.csv
If this CSV file was imported into a spreadsheet (e.g. Excel) it would look this:
Location | Table | Capture cycles | Captured rows | Routed bytes | Integrate cycles | Integrate transactions | Integrated updates | Integrated changes |
---|---|---|---|---|---|---|---|---|
cen | order | 25 | ||||||
cen | product | 100 | ||||||
cen | 6 | 12053 | ||||||
decen | order | 25 | 25 | |||||
decen | product | 100 | 100 | |||||
decen | 7 | 4 |