Daemon

Documentation / Community Edition / User Guide / Agent / Daemon

myarmdaemon -- ARM data collection daemon

The agent daemon is running in the background and supports the MyARM agent in delivering the measured ARM data to its final database or archive. It allows the central administration component of MyARM to configure the running MyARM system using the so-called runtime configuration. Also it can be controlled by the myarmdaemoncmd command to stop it, query some information.

Command line options

Usage:

myarmdaemon [options]

The myarmdaemon command supports standard options described in the appendix "Standard options".

-tp port, --tcp-port port
specifies the port number to wait for incoming TCP data connections if tcp mode is enabled. This overwrites the configuration property.

Collection mode

The myarmdaemon can be executed in different data collection modes which can be configured using the daemon.collection.mode configuration property:

none
This defines that the myarmdaemon should not collect any ARM data. This is usefull if the myarmdaemon is configured to provide only management interfaces (e.g. runtime configuration, access to archive files, Apache Spark support, etc).
tcp
The myarmdaemon opens a TCP socket to listen for incoming ARM data connections from TCP datasinks.

Main configuration

daemon.sink.name
specifies the datasink the received ARM data is written to if daemon.collection.mode configuration property is not set to none (see appendix "Configuring datasink component" for more details).
daemon.group
defines the group under which the myarmdaemon should be executed. If the myarmdaemon is started as super-user (root) it can change its group identity to the configured group name.

For example a myarm group.

daemon.user
defines the user under which the myarmdaemon should be executed. If the myarmdaemon is started as super-user (root) it can change its user identity to the user name.

For example a myarm user.

daemon.log.*
defines the logging message options and destination for the myarmdaemon program (See appendix "Configuring Log facility" for more details).
daemon.resource.watchdog.*
defines the resource watchdog logging for the myarmdaemon program (See appendix "Configuring resource watchdog" for more details).
daemon.pidfile
defines the file where the myarmdaemon writes its process id to.

Default is ${MYARM_VARRUN_DIR}/daemon.pid.

TCP server component

If the daemon.collection.mode configuration property was set to use the TCP server within the myarmdaemon, a TCP server listening socket will be created for listening for incoming connection requests from ARM instrumented applications using the tcp datasink. The following configuration properties can be used to control the TCP server component.

Configuration

daemon.tcp.host
defines the host/interface where the daemon listens for incoming data connections if the TCP part is enabled by the daemon.collection.mode.

Default host is localhost.

daemon.tcp.port
defines the port number where incoming connections are accepted if the TCP part is enabled by the daemon.collection.mode.

Default port is 5557.

daemon.tcp.max_clients
defines the maximum number of TCP clients if the TCP part is enabled by the daemon.collection.mode.

Note: This number should always be less than the number of allowed open files of the process. If not, the myarmdaemon tries to increase the number of open files of the process and if this fails, it terminates directly!

Default is 100, minimum is 1, maximum is 32768.

daemon.tcp.flowcontrol.threshold
if more than this percentage of ARM data buffers are in use, flow control will be enabled with the tcp datasink. If less than daemoon.tcp.flowcontrol.threshold ARM data buffers are currently used a new incoming ARM data buffer is acknowledged directly after reception. If more than daemon.tcp.flowcontrol.threshold ARM data buffers are in use, the acknowledgement of the reception is postponed until the ARM data buffer was processed and written to the myarmdaemon configured datasink.

Default is 10%, minimum is 5%, maximum is 50%.

Command component

The myarmdaemon can be controlled using a TCP command channel (if enabled). This allows an administrator to adopt the behaviour of the myarmdaemon at runtime without stopping and restarting the myarmdaemon.

Commands

The following commands are currently supported:

help
queries all available commands for this daemon.
info
queries general version, build information and enabled features about the running daemon.
stop
signals the daemon to terminate.
status
queries current status information from the myarmdaemon process. It supports the following options:
clients
shows detailed information about TCP client threads.
speed
shows incoming data speed (bytes per second).
all
shows all available information.
long
shows more detailed information.
noheader
avoid printing a header. This is useful if myarmdaemoncmd is used to execute the status command in a loop.

Configuration

daemon.cmd.enable
enables or disables the command TCP channel for the myarmdaemon.

Default is true.

daemon.cmd.host
defines the host/interface where the daemon listens for incoming command connections.

Default host is localhost.

daemon.cmd.port
specifies the command TCP channel port to use.

Runtime configuration component

The runtime configuration component is used to accept new runtime configurations from the central myarmadmin web application using a TCP channel.

Configuration

daemon.runtime.config.enable
boolean which indicates if the daemon accepts new runtime configurations (true) from the runtime administration web frontend or not (false).

Default is false.

daemon.runtime.config.localhost (New since "4.0.x.0")
boolean which indicates if the daemon should listen on localhost (true) for accepting runtime configuration connections or on the default interface of the host (false).

Default is true.

daemon.rts.enable
boolean which indicates if the daemon should calculate real time statistics (RTS) (true) or not (false). Note this only works if runtime configuration is enabled and appropriate RTS definitions are available.

Default is false.

Web application component

Starting with version 4.1 of MyARM the myarmdaemon can start the standalone web applications provided by MyARM. This can be enabled by specifying the interface/host and port on which the HTTP server of the web application should listen for incoming HTTP connections.

daemon.web.admin.http
defines the interface/host and port (delimited by a colon) on which the myarmadmin should listen for incoming HTTP connections. If an empty string is specified this feature will be disabled. For example localhost:8081 is commonly used for local HTTP server instances.

Default is "" (empty string).

daemon.web.browser.http
defines the interface/host and port (delimited by a colon) on which the myarmbrowser should listen for incoming HTTP connections. If an empty string is specified this feature will be disabled. For example localhost:8080 is commonly used for local HTTP server instances.

Default is "" (empty string).

daemon.web.rtsbrowser.http
defines the interface/host and port (delimited by a colon) on which the myarmrtsbrowser should listen for incoming HTTP connections. If an empty string is specified this feature will be disabled. For example localhost:8082 is commonly used for local HTTP server instances.

Default is "" (empty string).

daemon.web.rtsmonitor.http
defines the interface/host and port (delimited by a colon) on which the myarmrtsmonitor should listen for incoming HTTP connections. If an empty string is specified this feature will be disabled. For example localhost:8083 is commonly used for local HTTP server instances.

Default is "" (empty string).

Configuration example

# myarmdaemon processing mode: receive data via TCP and 
# store received data into a MySQL/MariaDB database
daemon.collection.mode = tcp
# set up host/interface and port where myarmdaemon is listening
# for incoming data connections, limit to 100 concurrent clients
daemon.tcp.host = localhost
daemon.tcp.port = 5557
daemon.tcp.max_clients = 100
# myarmdaemon TCP flow control threshold
daemon.tcp.flowcontrol.threshold = 10
# use MySQL datasink database
daemon.sink.name = db_mysql
# myarmdaemon process user/group name and pid file
daemon.user = myarm
daemon.group = myarm
daemon.pidfile = /opt/myarm/var/daemon.pid
# set up host/port where myarmdaemon is listening for command
# connections
daemon.cmd.host = localhost
daemon.cmd.port = 5554
See Also
myarmoptions, myarmconfig, myarmdaemoncmd