hvrstatistics – Extract statistics from HVR scheduler logfiles.
hvrstatistics [–options]... [hubdb]
The first argument hubdb specifies the connection to the hub database. This can be an Oracle, Ingres, SQL Server, DB2, DB2 for I, PostgreSQL, or Teradata database depending on its form. See further section Calling HVR on the Command Line.
|–btime||Only lines after 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. Alternatively, a specific channel can be omitted using form –c!chn. This option can be specified multiple times.|
|–etime||Only lines until 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, you can specify a reasonable subdivision of time-based columns, 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. 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.|
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 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|
|└─hvrstatistics.offset||State file for incremental statistics (option –i).|