Scripts

The following scripts are available when used from an initialized command window. The scripts can be executed from a Windows Command Prompt or UNIX terminal window. On Windows, you can type the commands as described in this section. On UNIX systems, you must add .sh to each command. For example, rtvapm_init.sh. Also on UNIX systems, it is a requirement that the installation directory path not contain spaces.

These instructions assume use of a BASH or a BASH-compliant shell.

Script Name

Description

my_alert_actions.bat/sh

Sample script to define actions for alerts.

Location:

The project directory.

Format:

my_alert_actions 
(Append .sh on UNIX)

rtv_setup.bat/sh

Initializes a command prompt or terminal window.

Location:

<installation directory>/bin 

This script must be executed in the directory in which it resides.

Format:

rtv_setup 
(Append .sh on UNIX)

rtvapm_init.bat/sh

Initializes a command window.

Location:

rtvapm

This script must be executed in the directory in which it resides.

Format:

rtvapm_init
(Append .sh on UNIX)

start_cmd.bat

Starts an initialized Command Prompt window on Windows.

Location:

<installation directory>/bin

This script must be executed in the directory in which it resides. You can also execute the script by double-clicking in an Explorer window.

start_rtv.bat/sh

Starts processes in an RTView configuration as specified in the rtvservers.dat configuration file.

Location:
rtvapm/common/bin

This script must be executed in the project directory (the directory containing the rtvservers.dat file). This script requires rtvapm_init.bat/sh be executed first.

An RTView configuration might include a Data Server or Display Server, an Historian and a Central Server Database. start_rtv only attempts to start processes it detects are not running. The action can be applied to all RTView configurations, a single RTView configuration or a single process in an RTView configuration.

Before starting an RTView server, this script detects port conflicts caused by another server. If the conflict is caused by another RTView server, it returns a message identifying that server by its rtvapm. For example:

...start_rtv.bat: another dataserver running with JMX port 3268 under C:\rtview\RTViewDataServer\rtvapm

 

If the port conflict is caused by a non-RTView process, it returns a message similar to this, for example:

...start_rtv.bat: JMX port 3268 in use by PID 1234

In both cases the script includes this advice:

Warning: server not started, port conflict

 

 

To avoid port conflicts, run your start script with the -portprefix: command line argument to change the first two (2) digits of all your server ports.

To persist these port changes, change the port prefix in the RTView Configuration Application or use the -saveportprefix command line argument.

Additional arguments can be included on the command line in which case they are passed to every server specified by the command.

Additional arguments can also be included in the rtvservers.dat file, in which case they are only applied to the specific server in whose command they are included.

Note: If you use the -properties or -propfilter argument with start_rtv, you should also use them with status_rtv and stop_rtv. Those commands use the JMX ports defined for the server, and if any of the properties specified by -properties or -propfilter arguments change those ports, subsequent commands will be unable to find the server unless also given those properties.

 

 

–console (or –c) - Start the processes with a command window (which is useful for testing).

When used without arguments, this script returns usage information and a list of available configurations. For example, start_rtv returns:

Usage: start_rtv config or 'all' [server or 'all'] [args...]
Available configs:
     default
          dataserver
          historian
          displayserver
          database
     sender
          dataserver

 

 

all 

Starts all RTView configurations that are specified in the rtvservers.dat file.

all applies the action to all RTView configurations specified in the rtvservers.dat file (and corresponding servers or clients specified in each configuration). Note: When multiple configurations are specified in the rtvservers.dat file and they have different project settings directory locations, the all argument processes all the configurations. However, if the configurations have the same project settings directory locations, the all argument processes only the first configuration as the others are considered alternative configurations.

Example:

start_rtv all
(Append .sh on UNIX)

 

[Configuration Name]

Starts a single RTView configuration specified in the rtvservers.dat file:

start_rtv [Configuration Name]
(Append .sh on UNIX)

Configuration Name is the RTView configuration name specified in the rtvservers.dat file. The action applies to all servers or clients specified in the configuration.

Example:

start_rtv web_deployment
(Append .sh on UNIX)

 

[Server Name]

Starts a single process in an RTView configuration specified in the rtvservers.dat file:

start_rtv [Configuration Name] [Server Name]
(Append .sh on UNIX)

Server Name is the name of a server or client member in the configuration. For example, dataserver, displayserver, historian and database. The action applies only to that server or client in the configuration.

Example:

start_rtv web_deployment dataserver
(Append .sh on UNIX)

 

Use With Secured JMX Ports

This script works with RTView servers whose JMX ports are secured with either a username and password, or with SSL. You provide the scripts with the necessary credential information and the scripts manage authentication with the server. There are two ways that you can provide credential information to the scripts: via command-line arguments and via properties placed in any property file that is used by the server.

 

Securing with username and password

  • To secure with a username and password via command-line, use the arguments as follows:

-jmxuser:...

-jmxpass:...

  • To secure with a username and password in a property file, use the properties as follows:

sl.rtview.jmxremote.username=...

sl.rtview.jmxremote.password=....

 

Securing with SSL

To secure with SSL, you provide the client KeyStore and TrustStore locations and their corresponding passwords.

  • To secure with SSL via command-line, use the arguments as follows:

-sslkeystore:...

-sslkeystorepass:...

-ssltruststore:...

-ssltruststorepass:...

  • To secure with SSL in a property file, use the properties as follows:

sl.rtview.ssl.client.keyStore=...

sl.rtview.ssl.client.keyStorePassword=...

sl.rtview.ssl.client.trustStore=...

sl.rtview.ssl.client.trustStorePassword=....

 

Password Encryption

To encrypt the passwords in your properties files, use the command-line tool "encode_string", for example:

encode_string encoder2 password

This will give you an encrypted value for "password" that you can use in your properties.

start_server.bat/sh

Starts the RTView DataServer.

Location:

<installation directory>

This script must be executed in the directory in which it resides. You can also execute the script by double-clicking in an Explorer window.

Format:

start_server 
(Append .sh on UNIX)

start_servers.bat/sh

Starts the RTViewCentral servers.

Location:

<installation directory>/bin

This script must be executed in the directory in which it resides. You can also execute the script by double-clicking in an Explorer window.

Format:

start_servers 
(Append .sh on UNIX)

start_tomcat.bat/sh

Starts Apache Tomcat.

Location:

<installation directory>/bin

This script must be executed in the directory in which it resides. You can also execute the script by double-clicking in an Explorer window.

Format:

start_tomcat 
(Append .sh on UNIX)

status_collector.bat/sh

 

Returns the status of RTView DataCollector.

Location:
<installation directory>

This script must be executed in the project directory (the directory containing the rtvservers.dat file).

Format:

status_collector 
(Append .sh on UNIX)

status_rtv.bat/sh

Returns the status of all RTView configurations that are specified in the rtvservers.dat configuration file.

Location:
rtvapm/common/bin

This script must be executed in the project directory (the directory containing the rtvservers.dat file). This script requires rtvapm_init.bat/sh be executed first.

This action uses defined JMX ports. An RTView configuration might include a Data Server, a Display Server or Viewer, an Historian and a Central Server Database. status_rtv only attempts to start processes it detects are not running. The action can be applied to all RTView configurations, a single RTView configuration or a single process in an RTView configuration.

Additional arguments can be included on the command line in which case they are passed to every server specified by the command. Additional arguments can also be included in the rtvservers.dat file, in which case they are only applied to the specific server in whose command they are included.

Note that if you use -properties or -propfilter arguments with start_rtv, you should also use them with status_rtv and stop_rtv. Those commands use the JMX ports defined for the server, and if any of the properties specified by -properties or -propfilter arguments change those ports, subsequent commands will be unable to find the server unless also given those properties.

 

all

Returns the status of all RTView configurations specified in the rtvservers.dat file. Note: When multiple configurations are specified in the rtvservers.dat file and they have different project settings directory locations, the all argument processes all the configurations. However, if the configurations have the same project settings directory locations, the all argument processes only the first configuration as the others are considered alternative configurations.

Example:

status_rtv all
(Append .sh on UNIX)

 

[Configuration Name]

Returns the status of a single RTView configuration specified in the rtvservers.dat file:

status_rtv [Configuration Name]
(Append .sh on UNIX)

Configuration Name is the RTView configuration name specified in the rtvservers.dat file. The action applies to all servers or clients specified in the configuration.

Example:

status_rtv web_deployment
(Append .sh on UNIX)

 

[Server Name]

Returns the status of a single process in an RTView configuration specified in the rtvservers.dat file:

status_rtv [Configuration Name] [Server Name]
(Append .sh on UNIX)

Server Name is the name of a server or client member in the configuration. For example, dataserver, displayserver, historian and database. The action applies only to that server or client in the configuration.

Example:

status_rtv web_deployment dataserver
(Append .sh on UNIX)

 

Use With Secured JMX Ports

This script works with RTView servers whose JMX ports are secured with either a username and password, or with SSL. You provide the scripts with the necessary credential information and the scripts manage authentication with the server. There are two ways that you can provide credential information to the scripts: via command-line arguments and via properties placed in any property file that is used by the server.

 

Securing with username and password

  • To secure with a username and password via command-line, use the arguments as follows:

-jmxuser:...

-jmxpass:...

  • To secure with a username and password in a property file, use the properties as follows:

sl.rtview.jmxremote.username=...

sl.rtview.jmxremote.password=....

 

Securing with SSL

To secure with SSL, you provide the client KeyStore and TrustStore locations and their corresponding passwords.

  • To secure with SSL via command-line, use the arguments as follows:

-sslkeystore:...

-sslkeystorepass:...

-ssltruststore:...

-ssltruststorepass:...

  • To secure with SSL in a property file, use the properties as follows:

sl.rtview.ssl.client.keyStore=...

sl.rtview.ssl.client.keyStorePassword=...

sl.rtview.ssl.client.trustStore=...

sl.rtview.ssl.client.trustStorePassword=....

 

Password Encryption

To encrypt the passwords in your properties files, use the command-line tool "encode_string", for example:

encode_string encoder2 password

This will give you an encrypted value for "password" that you can use in your properties.

status_server.bat/sh

Returns the status of the RTView DataServer.

Location:
<installation directory>

This script must be executed in the project directory (the directory containing the rtvservers.dat file).

Format:

status_server
(Append .sh on UNIX)

status_servers.bat/sh

Returns the status of the RTViewCentral servers (as well as the Solace PubSub+ Monitor in RTViewSolaceMonitor).

Location:
<installation directory>/bin

This script must be executed in the project directory (the directory containing the rtvservers.dat file).

Format:

status_servers
(Append .sh on UNIX)

stop_collector.bat/sh

Stops the RTView DataCollector.

Location:

<installation directory>

This script must be executed in the directory in which it resides. You can also execute the script by double-clicking in an Explorer window.

Format:

stop_collector 
(Append .sh on UNIX)

stop_rtv.bat/sh

Stops processes in an RTView configuration as specified in the rtvservers.dat configuration file.

Location:
rtvapm/common/bin

This script must be executed in the project directory (the directory containing the rtvservers.dat file). This script requires rtvapm_init.bat/sh be executed first.

This action uses defined JMX ports. An RTView configuration might include a Data Server or a Display Server, an Historian and a Central Server Database. stop_rtv only attempts to start processes it detects are not running. The action can be applied to all RTView configurations, a single RTView configuration or a single process in an RTView configuration.

Additional arguments can be included on the command line in which case they are passed to every server specified by the command. Additional arguments can also be included in the rtvservers.dat file, in which case they are only applied to the specific server in whose command they are included.

Note that if you use -properties or -propfilter arguments with start_rtv, you should also use them with status_rtv and stop_rtv. Those commands use the JMX ports defined for the server, and if any of the properties specified by -properties or -propfilter arguments change those ports, subsequent commands will be unable to find the server unless also given those properties.

Location:

project directory

This script must be executed in the project directory (the directory containing the rtvservers.dat file).

 

all

Stops all RTView configurations that are specified in the rtvservers.dat file. all applies the action to all RTView configurations specified in the rtvservers.dat file (and corresponding servers or clients specified in each configuration). Note: When multiple configurations are specified in the rtvservers.dat file and they have different project settings directory locations, the all argument processes all the configurations. However, if the configurations have the same project settings directory locations, the all argument processes only the first configuration as the others are considered alternative configurations.

Example:

stop_rtv all
(Append .sh on UNIX)

 

[Configuration Name]

Stops a single RTView configuration specified in the rtvservers.dat file:

stop_rtv [Configuration Name]
(Append .sh on UNIX)

Configuration Name is the RTView configuration name specified in the rtvservers.dat file. The action applies to all servers or clients specified in the configuration.

Example:

stop_rtv web_deployment
(Append .sh on UNIX)

 

[Server Name]

Stops a single process in an RTView configuration specified in the rtvservers.dat file:

stop_rtv [Configuration Name] [Server Name]
(Append .sh on UNIX)

Server Name is the name of a server or client member in the configuration. For example, dataserver, displayserver, historian and database. The action applies only to that server or client in the configuration.

Example:

stop_rtv web_deployment dataserver
(Append .sh on UNIX)

 

Use With Secured JMX Ports

This script works with RTView servers whose JMX ports are secured with either a username and password, or with SSL. You provide the scripts with the necessary credential information and the scripts manage authentication with the server. There are two ways that you can provide credential information to the scripts: via command-line arguments and via properties placed in any property file that is used by the server.

 

Securing with username and password

  • To secure with a username and password via command-line, use the arguments as follows:

-jmxuser:...

-jmxpass:...

  • To secure with a username and password in a property file, use the properties as follows:

sl.rtview.jmxremote.username=...

sl.rtview.jmxremote.password=....

 

Securing with SSL

To secure with SSL, you provide the client KeyStore and TrustStore locations and their corresponding passwords.

  • To secure with SSL via command-line, use the arguments as follows:

-sslkeystore:...

-sslkeystorepass:...

-ssltruststore:...

-ssltruststorepass:...

  • To secure with SSL in a property file, use the properties as follows:

sl.rtview.ssl.client.keyStore=...

sl.rtview.ssl.client.keyStorePassword=...

sl.rtview.ssl.client.trustStore=...

sl.rtview.ssl.client.trustStorePassword=....

 

Password Encryption

To encrypt the passwords in your properties files, use the command-line tool "encode_string", for example:

encode_string encoder2 password

This will give you an encrypted value for "password" that you can use in your properties.

stop_server.bat/sh

Stops the RTView DataServer.

Location:

<installation directory>

This script must be executed in the directory in which it resides.

Format:

stop_server 
(Append .sh on UNIX)

stop_servers.bat/sh

Stops the RTViewCentral servers.

Location:

<installation directory>/bin

This script must be executed in the directory in which it resides. You can also execute the script by double-clicking in an Explorer window.

Format:

stop_servers 
(Append .sh on UNIX)

stop_tomcat.bat/sh

Stops Apache Tomcat.

Location:

<installation directory>/bin

This script must be executed in the directory in which it resides.

Format:

start_tomcat 
(Append .sh on UNIX)

update_wars.bat/sh

Creates/updates the primary Monitor servlets.

 

Location:

<installation directory>/projects/rtview-server

This script must be executed in the directory in which it resides. This script requires rtvapm_init.bat/sh be executed first.

 

Format:

update_wars.sh [appname [host [portprefix]]]

 

For example:

update_wars.sh my-appname my-hostname 99

 

The name, host, and portprefix are declared in variables at the top of the script for easy editing, and can be passed into the scripts on the command-line.

 

-secure

Use the "-secure" argument to update the rtvquery war with security enabled.

You can use ? or help to get a usage message. For example:

update_wars.sh help

 

You can edit other variables at the top of the scripts to set properties for high-availability (HA).

Set HA_HOST to the hostname of the backup data server.

Set HA_DISPLAYHOST to the hostname of the backup display server.

Set HA_FAILBACK to true to automatically reconnect to the primary display server.