Contents / Java Edition / User Guide / Appendix / Environment

The MyARM agent library can be configured through configuration files (See Appendix Configuration). MyARM needs to find the configuration files during start up. This is achieved by using environment variables.

The following environment variables can be set to specify the location of the configuration files and to set a valid license key. The easiest way to do this is to use the provided setup.sh script found in the scripts directory of the MyARM installation.

Please note that you have to source this script in order to set the environment variables in the current shell!


The setup.sh script is used to setup a MyARM environment in an easy way. The script tests your shell environment and modifies the following system environment variables to enable the full usage of MyARM:

is modified to add the path to the MyARM programs so that any MyARM program can be executed.
is modified to enable the runtime linker to find MyARM shared libraries (LD_LIBRARY_PATH on Linux).
is modified to add the MyARM man page directory to the search path of the man system.
is set to the MySQL port as used by the current system. If this could not be determined, a warning message is issued.

To work properly, the following MyARM specific environment variables are set:

root directory of the MyARM installation.
directory where to store any runtime data such as pid files or temporarily used files.
directory where to store any log files.
directory where to store any files which need to be persistent, such as SQLite databases or MyARM ARM data files.
contains the configuration end point in URL notation. For more information read section MYARM_CONFIG_URL.
contains the license key for MyARM. This key is extracted from some configuration files. For more information see section "License key".


$ . scripts/setup.sh [-q] [config]

The "-q" option suppresses any warning and the basic configuration output. The optional "config" parameter specifies a configuration to be used. This configuration must reside in the $MYARM_ROOT/conf or $MYARM_ROOT/conf/templates directory.

Typical usage of the setup.sh script, which configures MyARM in the current shell to use the myarmdaemon to receive data sent by the tcp datasink and store the ARM data into MySQL database:

user@localhost:/opt/myarm$ . scripts/setup.sh tcp_mysql.conf

MyARM environment variables


The MYARM_CONFIG_URL environment variable is used to specify the MyARM configuration file. It uses the common URL notation of the form <protocol>://<host>:<port>/<filepath>. Currently, the following <protocol> types are supported:

specifies a local configuration file.

For example, if you want to specify a global <filepath> you have to use two slashes after the protocol indicator, resulting in the following setup:


$ myarmquery FooTran FooApp


If the MYARM_LICENSE_KEY environment variable is set and is not empty, it contains the license key to deploy the MyARM components on this host.


This variable is used within the configuration files to reference the directory where to store runtime data like pid files or temporary data.


This variable is used within the configuration files to reference the directory where to log messages.


This variable is used within the configuration files to reference the directory where to store persistent data such as a SQLite database file or ARM data files.


With the MYARM_TRACE environment variable it is possible to enable diagnostic trace messages during configuration and initialization of the MyARM agent to the standard error channel. Currently, the following options are supported, which can be combined using a comma character as the delimiter:

no tracing at all.
enables all the following trace options.
enables tracing of initialization and cleanup of the MyARM agent.
enables tracing output of all used environment variables.
enables tracing output of all configuration properties.
enables tracing of reading configuration files.

For example:

export MYARM_TRACE=init,env
export MYARM_TRACE=all