Service Agent

For every remote machine hosting one or more Xmarc Services, there is one or more Service Agent programs running permanently. These are installed on the remote host as Operating System services or daemons, and each listens for communication from the Service Manager or a Service Broker on a fixed port. This port, known as the Service Agent Listening Port, is selected by the administrator and is the port provided to the Services Manager Console when starting services via a ServiceAgent.

A Service Agent is used to initiate services, maintain log information from them, and in extreme services kill processes which may have got into an unknown state. An agent returns log information to the Service Manager on request from the Agent Administration Screen.

When a Service Agent starts, it inherits all environment variables from the system and passes them to newly-launched C/C++ processes. This ensures that such processes have the expected system environment on start-up. These environment variables are not made available to Java services.


A Service Agent receives log messages from the Xmarc Services which it initiated. These log messages are added to a common log file, known as the Service Log, and can be inspected from the Service Manager Console to determine the state or progress of individual services.

The maximum size of this log file (in lines) is configurable. Once this limit has been reached a new log file is created, and so on until the maximum number of log files has been reached. This maximum number of log files is also configurable. Once this limit has been reached previous log files are overwritten in a circular fashion.

The administrator, via the Service Manager Console, may request to see the last <n> lines of the log file, or may request all of the log file, in which case the line maximum is used. The log files may be inspected on the remote machine if necessary, they are simple text files with configurable name (see below).

The logging level may be set for a Logical Service via the Service Manager Console. There are currently 5 logging levels.

0       System errors and service start/stop messages;
1       0 + Client connect and disconnect messages;
2       1 + Application errors;
3       2 + Full command monitoring;
4       3 + Full debug messages;

Xmarc Services begin with a logging level of 1.

Previous Chapter   Next Chapter