Miscellaneous

Contents / C/C++ Edition / User Guide / Appendix / Miscellaneous

Scripts

MyARM daemon support script

MyARM agent has daemon processes described in section myarmdaemon which is working in background and provide different kind of services. To simplify the starting and stopping of this daemon process the following script is provided:

myarmdaemon.sh
starts, stops and provides basic information about the running myarmdaemon.

Usage:

myarmdaemon.sh [-q] [-v] start|stop|restart|status|info

This script can also be used as an init.d script used to start the myarmdaemon process during boot time of the machine.

The following parameter can be passed to the script:

-q
enables quiet mode. Nothing will be printed to stdout.
-v
enables verbose mode. Prints the used MyARM environment if it was sourced.
start
tries to start the myarmdaemon.
stop
tries to stop the myarmdaemon.
restart
tries to stop and restart the myarmdaemon.
status
checks if the myarmdaemon is running or not.
info
if the myarmdaemon is running it prints basic information of the current myarmdaemon process.

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.
myarm:///<myarm_file>
defines a MyARM data file where <myarm_file> is the file name of the MyARM data file. The name can be an absolute or a relative file name (e.g. ../myapp.myarm or /opt/data/myapp.myarm).
mysql://<password>:<user>@<host>:<port>/<tranDB>?parameters
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 using <tranDB> as the MySQL database instance.

The following optional parameters can be specified:

connections=num
The optional connections parameter can be used to specify the number of parallel active connections.
config=database
The optional config parameter can be used to specify the database where MyARM stores configuration data.