Miscellaneous

Online section / Guides / User Guide / Appendix / Miscellaneous contact | download | sitemap
 

Scripts

Setup script

The setup.sh script sets up all necessary environment variables and configuration properties to deploy any ARM instrumented application or any MyARM tool.

Assuming the current working directory is the top-level directory of a MyARM installation the script can be executed (sourced) (in korn shell like environment) using the following input:

. ./scripts/setup.sh [<conf_file>]

The script uses the given configuration name (such as mysql or mysql.conf) to setup the configuration environment variable MYARM_CONFIG_URL. If no name is specified it uses the name myarm.conf which should be a soft link to the real configuration file. If this also does not exists it uses the sqlite3.conf.

In an unix like environment the following environment variables are set:

MYARM_ROOT
root directory of the MyARM installation.
MYARM_VAR_DIR
directory where to store any runtime data such as log files and pid files.
MYARM_CONFIG_URL
contains the configuration end point in URL notation. For more information see section "Environment".
MYARM_LICENSE_KEY
contains the license key of MyARM. This key is extracted from some configuration files. For more information see section "License key".
PATH
variable is modified so that the MyARM tools can be found.
LD_LIBRARY_PATH
variable is modified so that the dynamic loader can find any needed shared libraries provided by MyARM.
MANPATH
variable is modified so that the MyARM man pages can be found by the man command.

MyARM daemon support scripts

MyARM has several daemon processes described in "Agent tools" which are working in background and to provide different kind of services. To simplify the starting and stopping of these daemon processes the following scripts are provided:

myarmtcpd.sh
starts and stops the myarmtcpd program.

Usage:

myarmtcpd.sh start|stop
myarmfiled.sh
starts and stops the myarmfiled program.

Usage:

myarmfiled.sh start|stop

These scripts can also be used as init.d scripts used to start processes during boot time of the machine.

Database URL notation

In MyARM a database is normally configured using MyARM configuration properties. If a database configuration should be specified for example on the command line these properties does not work. For this purpose MyARM provides an URL like notation for each supported database type. The type of the database is defined by the scheme (or normally known as protocol prefix) of the URL. Currently the following MyARM database URL types are supported:

sqlite3:///<sqlite_db_file>
defines a SQLite database where <sqlite_db_file> is the file name of the sqlite database file. The name can be an absolute or a relative file name.
xml:///<xml_file>
defines a XML file where <xml_file> is the file name of the XML file. The name can be an absolute or a relative file name.
mysql://<password>:<user>@<host>/<tranDB>/<appDB>/<defDB>
defines a MySQL database where <password> and <user> is the password and user name to log into the MySQL database. The <host> specifies the host name where the MySQL database is running on and the <tranDB>, <appDB> and <defDB> specifies the MyARM databases within the MySQL database server.
oracle://<password>:<user>@<server>/<SID>/<tablespace>
defines an Oracle database where <password> and <user> is the password and user name to log into the Oracle database server. The <server> specifies the host name where the Oracle database server is running on and the <SID> specifies the oracle system ID which should be used. <tablespace> defines the tablespace name to create or use.