This section describes how to start the Historian Application and describes the Historian Application interface. For information about configuring the Historian, see “Configuring the Historian”.
The first time you start the Historian you must start it as an application to configure the initial settings. You can start the Historian Application on Windows or UNIX. After you configure the Historian, you can run it as a daemon process or as a Windows Service.
There are several ways to start the Historian:
§ “Starting the Historian Application”
§ “Starting the Historian as a daemon process”
§ “Starting the Historian in the background as a Windows Service”
Several command line options are supported for the Historian. Java options specified in RTV_JAVAOPTS are used by the run_historian scripts.
To rebuild HISTORY and HISTORY_S tables each time you run the Historian, use the -rebuildtables command line option for the Historian. See “Command Line Options: Historian” for more information.
If you manually created your Historian tables, the tables are automatically rebuilt as data is received.
The Historian is instrumented with JMX to allow you to manage and monitor application settings. See “Managing the Historian Using JMX” for more information.
Starting the Historian Application
In an initialized terminal window (see “Initializing a Command Prompt or Terminal Window”) type: run_historian
The Historian application opens.
Starting the Historian as a daemon process
The first time you start the Historian, you should start it as an application to configure the initial settings.
Running the Historian as a daemon process allows you to run the Historian without a display. To do so, run the -daemon command line parameter from a Windows Command Prompt or UNIX terminal window.
Starting the Historian in the background as a Windows Service
The first time you start the Historian, you should start it as an application to configure the initial settings.
See “Running as a Windows Service”.
Use the Historian Application to make final configurations for the Historian database connections. For details about configuring the Historian Application, see “Historian Application Configuration”.
Note: The Historian Application configuration occurs within a series of Historian configuration steps. For details, see “Configuring the Historian”.
Use the Historian Application:
§ Configuration tab to specify settings for the Historian. Click Save Configuration to save these settings. Select Show Data in Console to output a line for each record that is stored in the database to the Console tab.
§ Console tab to view errors and information.
§ Server Group tab to configure failover. For details about configuring failover, see “Configuring Failover on the Historian”.
Data source-specific options are read in from initialization (.ini) files created in the Display Builder. For information on creating initialization files or command line options for your data source, refer to Application Options or Command Line Options in the “RTView Data Sources” section of this documentation.
Database Options Region
Field Name |
Description |
Historian Database Name |
The Data Source Name for the database the Historian will use to store and query information. Note: This name must also match the name of the history database configured in the Display Builder's Application Options> “SQL Tab”. |
Database User Name |
The user name to pass into the history database when making a connection. This parameter is optional. You cannot edit this field while the Historian is storing data. |
Database Password |
The password to pass into the history database when making a connection. This parameter is optional. You cannot edit this field while the Historian is storing data. If you need to provide an encrypted password (rather than expose server password names in a clear text file), use the encode_string command line option with the following syntax: encode_string mypassword where mypassword is your plain text password. For example, enter the following in an initialized command window (see “Initializing a Command Prompt or Terminal Window”): encode_string mypassword and you will receive an encrypted password: encrypted value: 013430135501346013310134901353013450134801334 Copy the encrypted value, paste it into the password field and click Save to save this value to the initialization (*.ini) file. Or, if necessary, manually edit the (*.ini) file to include the encrypted value. Note: If you need to manually edit a configuration (*.ini) file, contact SL Technical Support at support@sl.com for information about supported syntax. |
JDBC Driver Class Name |
The fully qualified name of the JDBC driver class to use when connecting to the history database. The path to this driver must be included in the RTV_USERPATH environment variable. You cannot edit this field while the Historian is storing data. |
JDBC Database URL |
The full database URL to use when connecting to the history database using the specified JDBC driver. Consult your JDBC driver documentation if you do not know the database URL syntax for your driver. You cannot edit this field while the Historian is storing data. |
Append Timestamp Type |
Specify the type of timestamp. None - No TIMESTAMP column is stored. SQL Timestamp - A single TIMESTAMP column is stored using a standard SQL TIMESTAMP data type. String Timestamps (2) - Two TIMESTAMP columns are stored with each record as strings. This is the default. |
Record Retention Region
Field Name |
Description |
Delete Records Periodically |
If selected, the Historian will periodically delete records from the numeric table (HISTORY or the table name you specified) and the string table (HISTORY_S or the table name you specified) according to the rate set. |
Rate to Delete Records |
The length of time (in minutes, hours or days) a record can exist before it marked for deletion. For example if you set the rate to 5 minutes, then the next time you start RTView all records older than 5 minutes will be deleted. For the remainder of your work session, RTView will search every 2.5 minutes (half the rate) for records that exceed the rate. |
Purge Database on Start |
If selected, the Historian will clear out the numeric table (HISTORY or the table name you specified) and the string table (HISTORY_S or the table name you specified) before storing new data. |
Purge Database |
Clears out the numeric table (HISTORY or the table name you specified) and the string table (HISTORY_S or the table name you specified) immediately. |
Data Cache Options
Field Name |
Description |
Cache Data |
If selected, the Historian will cache data according to the Cache Duration and Cache Size specifications. If both Cache Duration and Cache Size are set, then the data records will be committed as soon as the first limit is reached. |
Cache Duration (seconds) |
Length of time (in seconds) to cache before committing records to the database. If the value is set to 0, the Historian will not commit records in the database immediately, but rather will store them in the cache to be committed later. |
Cache Size (records) |
Number of records to cache before committing them to the database. |
Flush Cached Records |
Flush all cached records to the database immediately. |
Store Last Values |
Only If selected, the Historian will store only the last (most recent) values in the cache for each unique data attachment. By default, the Historian stores all records in the cache each time the Cache Duration or Cache Size limit is reached. This option allows the Historian to store less data than it receives, which can be useful in a configuration where the Historian receives data from the Data Server at a higher rate than necessary for historical storage. For example, suppose the Data Server sends tables from two SQL attachments to the Historian: Query1: select * from table1 Query2: select * from table2 If the Data Server executes those queries every 10 seconds and the Historian has Cache Duration of 60 seconds, then every 60 seconds the Historian's data cache will contain six result tables from Query1 and six result tables from Query2. By default, the Historian will commit all twelve tables to the database. However, if Store Last Values is selected, the Historian will commit only the sixth (most recent) table from Query1 and Query2 and discard all other tables in the cache. Note: This option is available only if Cache Data is selected and the value of Cache Duration is greater than 0. |
Data Configuration Files Region
Field Name |
Description |
Data Configuration Files Add |
Add a data configuration file to the list. Data configuration files are display (.rtv) files that were created in the Display Builder. When you start storing data, a record will be added to the database each time new information is received for each data attachment in all of the specified data configuration files. Note: If a data configuration file is added while the Historian is storing data, it will start storing data for attachments in that file as soon as new information becomes available. |
Remove |
Remove the selected data configuration file from the list. If the Historian is storing data when a file is removed, it will stop storing data for that file immediately. |
Substitutions |
To add or edit a substitution on a specified data configuration (.rtv) file, double-click in the corresponding field of the Substitutions column. See “Substitutions” for more information. |
Console Region
Field Name |
Description |
Show Data in Console |
If selected, the Historian Console prints out a line for each record that is being stored in the database. |
General Options
Field Name |
Description |
Start/Stop Storing Data |
Start or stop storing data in the database. |
Save Configuration |
Save settings to an initialization file (HISTORY.ini), which will be used next time you run the Historian. Note: Unless you specify a directory for your initialization files, you must run the Historian from the same directory in which the initialization (.ini) file was saved. See “RTV_JAVAOPTS” for more information. |
About |
Click on to read about RTView. |
Exit |
Exit the Historian, stop storing data in the database and close the Historian window. |