RTView EM Scripts
The following scripts are available when used from
an
initialized command window.
We recommend that all scripts be executed from
your project
directory. The scripts can
be
executed from a Windows Command Prompt or UNIX
terminal window. On Windows, you can type the
commands as described in the following section; on UNIX systems you must add
.sh
to each command. For example, rundata.sh.
Also, you can write the paths using the
forward-slash (/) notation on both Windows and UNIX systems. For
example, if your project settings directory is located in a subdirectory
below the location of your rtvservers.dat file, you write the path as
./subdirectory on both Windows and UNIX.
Name |
Description |
dos2unix.bat |
Replaces Windows line termination to Unix format.
This script is not available as .bat script.
Location:
rtvapm/common/bin |
my_alert_actions.bat |
Sample script to define actions for alerts.
Location:
rtvapm/common/bin |
rtvapm_init.bat
|
Initializes a command window.
Format:
rtvapm_init.bat
Location:
project
directory
|
rtvapm_ports.bat |
Outputs a list with all ports in the RTView EM
installation. Format:
rtvapmports.bat > [outputFile]
outputFile – Text file name.
Location:
rtvapm/common/bin |
rtvapm_user_init.bat
|
Initializes a user command window.
Format:
rtvapm_user_init.bat
Location:
project
directory |
runa.bat
|
Executes RTView Analyzer to extract the function
chain of the chosen cache definition file. It returns a .pdf file with a
graph of the function chain of all caches in the file. The two scripts have the
same functionality. Format:
runa.bat [cacheDefFile].rtv
cacheDefFile - Cache definition file name.
Location:
rtvapm/common/bin |
runb.bat
|
Starts the Display Builder. The two scripts have the
same functionality.
Format:
runb.bat [-ds] [-bg]
-ds - To
use the currently running Data Server.
-bg - Runs the Display Builder
as a background process.
Location:
rtvapm/common/bin |
rundata.bat |
Starts the Data Server. We recommend that you use
the start_rtv.bat script.
Format:
rundata [-properties]:[Property File Name]
-properties
- specifies to apply a specific property file.
Property File Name - the name of the
properties file to apply.
Location:
rtvapm/common/bin
Example:
rundata -properties:mycustom.properties |
rundb.bat |
Starts the HSQLDB database. We recommend that you use the
start_rtv.bat script.
Location:
rtvapm/common/bin |
rundisp.bat
|
Starts the Display Server. We recommend that you use the
start_rtv.bat script.
Location:
rtvapm/common/bin |
runhist.bat
|
Starts the Historian. We recommend that you use the
start_rtv.bat script.
Location:
rtvapm/common/bin |
runv.bat
|
Starts the Display Viewer. We recommend that you use
the start_rtv.bat script.
Location:
rtvapm/common/bin |
start_rtv.bat
|
Starts processes in an EM configuration as specified
in the
rtvservers.dat configuration file.
An EM configuration might include a Data
Server, a Display Server or Viewer, 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 EM
configurations, a single EM configuration or a single process in an EM
configuration.
If the Display Viewer is started using the
start_rtv script, the Viewer cannot be stopped using the stop_rtv
script. You can stop the Viewer by closing its window.
To use additional arguments you must either
specify a configuration (to apply the argument to all servers in a
configuration) or all (to apply the argument to all configurations).
–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
Location:
rtvapm/common/bin |
all |
Starts all EM configurations specified in the
rtvservers.dat file.
all
applies the action to all EM 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. For
details, see
rtvservers.dat.
Example:
start_rtv.bat
all |
[Configuration Name] |
To start a single EM configuration specified in
the
rtvservers.dat file:
start_rtv.bat
[Configuration Name]
Configuration Name is the EM
configuration name specified in the
rtvservers.dat file. The action
applies to all servers or clients specified in the configuration.
Example:
start_rtv.bat
web_deployment
|
[Server Name] |
To start a single process in an EM configuration
specified in the
rtvservers.dat file:
start_rtv.bat
[Configuration Name] [Server Name]
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.bat
web_deployment dataserver |
status_rtv.bat
|
Returns the status all EM configurations specified
in the
rtvservers.dat configuration file.
This action uses defined JMX ports.
An EM 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 EM
configurations, a single EM configuration or a single process in an EM
configuration.
To use additional arguments you must either
specify a configuration (to apply the argument to all servers in a
configuration) or all (to apply the argument to all configurations).
–console (or –c)
- Start the processes with a command window
(which is useful for testing).
This command
returns status information upon execution. For example:
Status default:
dataserver: Running PID 4696 Uptime 000:00:01:47 CPU 00:00:02 Heap 0.7% Clients
2
displayserver: Running PID 6340 Uptime 000:00:01:45 CPU 00:00:01 Heap 1.0%
Displays 0
historian: Running PID 6108 Uptime 000:00:01:42 CPU 00:00:01 Heap 1.3% Connected
true
database: Running PID 6848 Uptime 000:00:01:39 CPU 00:00:00 Heap 0.4%
In the above example, note that the Data Server reports two clients,
the Display Server and the Historian. Both the Display Server and the Historian
were started with the –ds argument, which connects them to the Data
Server. Note also that the Historian reports that it is connected to the
database.
In the following example, status_rtv reports
that a configured
port is in use but the process using the port does not appear to belong to RTView
EM:
dataserver: Data port xxx in use by PID yyy
displayserver: JMX port xxx in use by PID yyy
When
used without arguments, returns usage information and a list of available
configurations. For example, status_rtv returns:
Usage: status_rtv config [server] or 'all'
Available configs:
default Location
rtvapm/common/bin |
all |
Returns the status of all EM configuration 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. For
details, see
rtvservers.dat.
Example:
status_rtv.bat
all |
[Configuration Name] |
Returns the status of a single EM configuration
specified in the
rtvservers.dat file:
status_rtv.bat
[Configuration Name]
Configuration Name is the EM
configuration name specified in the
rtvservers.dat file. The action
applies to all servers or clients specified in the configuration.
Example:
status_rtv.bat
web_deployment
|
[Server Name] |
Returns the status of a single process in an EM
configuration specified in the
rtvservers.dat file:
status_rtv.bat
[Configuration Name] [Server Name]
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.bat
web_deployment dataserver |
stop_rtv.bat
|
Stops processes in an EM configuration as specified
in the
rtvservers.dat configuration file.
This action uses defined JMX ports.
An EM configuration might include a Data
Server, a Display Server or Viewer, 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 EM
configurations, a single EM configuration or a single process in an EM
configuration.
To use additional arguments you must either
specify a configuration (to apply the argument to all servers in a
configuration) or all (to apply the argument to all configurations).
–console (or –c)
- Start the processes with a command window
(which is useful for testing).
If the Display Viewer is started using the
start_rtv script, the Viewer cannot be stopped using the stop_rtv
script. You can stop the Viewer by closing its window.
NOTE: The HSQLDB server (if used) runs with a
command window on Windows and cannot be stopped using the stop_rtv
command. You can stop the HSQLDB server by typing Ctrl-C in its command
window.
This command
returns status information upon execution. For example:
Stop default:
dataserver: Stopped PID 4696 via JMX port 3368
If no JMX port is configured the stop_rtv command
reports the following:
dataserver: No JMX port configured; must kill PID xxx by system command.
If the port is in use but the PID is not available (HP-UX, some Linux systems)
then the stop_rtv and status_rtv command will report the PID as “???”, for
example:
dataserver: Running PID ??? Uptime 000:00:00:37 CPU 00:00:01 Heap 1.3% Clients 1
dataserver: Stopped PID ??? via JMX port 3368
NOTE: On Windows the HSQLDB server (if used) runs
with a command window and cannot be stopped via the stop_rtv command. To
stop the HSQLDB server, execute Ctrl+C in its command window.
–console (or –c)
- Start the processes with a command window
(which is useful for testing).
When
used without arguments, returns usage information and a list of available
configurations. For example, stop_rtv
returns:
Usage: stop_rtv
config [server] or 'all'
Available configs:
default Location:
rtvapm/common/bin |
all |
Stops all EM configurations specified in the
rtvservers.dat file.
all
applies the action to all EM 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. For
details, see
rtvservers.dat.
Example:
stop_rtv.bat
all |
[Configuration Name] |
Stops a single EM configuration specified in the
rtvservers.dat file:
stop_rtv.bat
[Configuration Name]
Configuration Name is the EM
configuration name specified in the
rtvservers.dat file. The action
applies to all servers or clients specified in the configuration.
Example:
stop_rtv.bat
web_deployment
|
[Server Name] |
Stops a single process in an EM configuration
specified in the
rtvservers.dat file:
stop_rtv.bat
[Configuration Name] [Server Name] 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.bat
web_deployment dataserver |
update_wars.bat |
Script to regenerate war files
when the configuration of the Solution Package has changed.
Location:
rtvapm/<package_name>/projects/sample
|
rtvservers.dat
The rtvservers.dat text file, located in
your project
directory/servers directory, is a configuration file used to manage your EM deployment and EM
processes. The
rtvservers.dat file contains one or more EM configurations. An EM
configuration might include any of the following: Data Server,
Historian, HSQLDB database, and either a Display Server (for a Web Deployment) or
a Display Viewer (for a Desktop Deployment). The
rtvservers.dat file is used when the following scripts are executed:
-
start_rtv Starts EM
processes specified in the rtvservers.dat file.
-
stop_rtv Stops the EM
processes specified in the rtvservers.dat file.
-
status_rtv Returns
status information for EM processes specified in the rtvservers.dat
file.
Single Configuration File
The following rtvservers.dat file contains a single EM
configuration, named default, for a Web deployment.
default . dataserver rundata default .
historian runhist -ds default . displayserver rundisp -ds default .
database rundb
NOTE: The last line in the rtvservers.dat
file must end with a new line, or be followed by a blank line.
In this example, to start the default
configuration type: start_rtv default or start_rtv all. To start a
single server in the configuration, type start_rtv <Configuration Name>
<Server Name>. For example: start_rtv default displayserver.
Each line has the following format consisting
of four fields:
<Configuration Name> <Project Settings
Directory Location> <Property Filter Identifying the Server> <Command>
<Configuration Name> |
The name of the EM configuration ("default"
in this example). |
<Project Settings Directory Location> |
The EM project
settings directory location, relative to the location of the
rtvservers.dat file (“.”, the current directory, in this example). |
<Property Filter Identifying the Server> |
The property
filter that identifies the server, which is the property filter under which the
server’s JMX port is defined. By default, this is the server name, such as
dataserver, displayserver and historian. |
<Command> |
The script
used to start the process. Valid values are:
rundata:
Starts the Data Server. runhist:
Starts the Historian. rundisp:
Starts the Display Server. rundb:
Starts the HSQLDB Database. runv:
Starts the Display Viewer.
|
Multiple
Configuration File
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. Alternative configurations allow you to
alternate between two configurations for a single EM deployment.
For example, the following rtvservers.dat
file contains two configurations, bwmon and emsmon. Note that the
Project Settings Directory Locations differ (./bwmon and ./emsmon,
respectively).
bwmon ./bwmon dataserver rundata bwmon ./bwmon
historian runhist -ds bwmon ./bwmon displayserver rundisp -ds
emsmon ./emsmon dataserver rundata emsmon ./emsmon historian runhist -ds
emsmon ./emsmon displayserver rundisp –ds
Because the Project Settings Directory Locations
differ, you can use type
start_rtv all to start both configurations. To start only
the bwmon configuration, type: start_rtv bwmon. To start a single
server in the bwmon configuration, type start_rtv <Configuration Name>
<Server Name>. For example: start_rtv bwmon displayserver.
The following illustrates an rtvservers.dat
file with an alternate configuration: desktop is for a Desktop Deployment and browser
is for a Browser Deployment. Note that the Project Settings Directory Location
are the same (./bwmon
for both). This rtvservers.dat file allows you to switch between a Web Browser and
a Desktop Deployment.
desktop ./bwmon dataserver rundata desktop
./bwmon historian runhist -ds desktop ./bwmon viewer runv -ds
browser ./bwmon dataserver rundata browser ./bwmon historian runhist -ds
browser ./bwmon displayserver rundisp -ds
When the rtvservers.dat file contains
an alternate configuration as this example does, the all argument processes
only the first configuration, in this case, the desktop
configuration. To process the second configuration type: start_rtv browser.
|