Hvrstatistics

From HVR
Jump to: navigation, search
Commands
Previous: hvrstart
Next: hvrstats
Command Reference

Name

hvrstatistics – Extract statistics from HVR scheduler logfiles.

Note: Since HVR 5.3.1/25, hvrstatistics is replaced with hvrstats.

Synopsis

hvrstatistics [–options]... [hubdb]

Description

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.

Note: Command hvrstatistics cannot process files containing more than 12 months of data.

SC-Hvr-Statistics.png

Options

Parameter Description
–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.
Note: 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.

SC-Hvr-StatisticsResults cycles rows.png

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
cen order 25
cen product 100
cen 6 12053
decen order 25 25
decen product 100 100
decen 7 4

Files

Folder-icon.png HVR_CONFIG
└─ Folder-icon.png files
└─hvrstatistics.offset State file for incremental statistics (option –i).