Launch the Database Agent using System Properties

The following assumes that all the necessary parameters have been specified in the controller-info.xml

Method 1: Launch Agent with Start Script

You can use a script to start the agent. This is the recommended method.

Linux

./start-dbagent -Xms<min_heap_size> -Xmx<max_heap_size> &

Windows

start-dbagent.bat -Xms<min_heap_size> -Xmx<max_heap_size>

Alternatively, you can launch the agent as a Windows Service (as of 4.5.4). See Install the Database Agent as a Windows Service.

Method 2: Launch Agent with Java Command

Alternatively, you can launch the agent with these Java commands:

Linux

java -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError="kill -9 %p" -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -jar db-agent.jar

Use the following command if you are using Java >15:

java -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError="kill -9 %p" -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -jar db-agent.jar --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED

Windows

java -Djava.library.path="<db_agent_home>\auth\x64" -Ddbagent.name="Scarborough Network Database Agent" -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -jar <db_agent_home>\db-agent.jar

Use the following command if you are using Java >15:

java -Djava.library.path="<db_agent_home>\auth\x64" -Ddbagent.name="Scarborough Network Database Agent" --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -jar <db_agent_home>\db-agent.jar

System Properties

Database Agent Name

Configure using System Properties: -Ddbagent.name=<db_ <db_agent_name>

Type: ASCII string, including spaces. If <db_agent_name> contains spaces, you must enclose the entire name in double quotes (" ").

Required: Yes, when you have multiple agents reporting to the same Controller.

Default : Default Database Agent

Java Library Path

Configure using System Properties: -Djava.library.path=<db_agent_home>\auth\x64

Type: ASCII string, including spaces. If <db_agent_home> contains spaces, you must enclose the entire name in double quotes (" ").

Required: Yes, for Windows only

Specify:

  • For 64-bit systems: <db_agent_home>\auth\x64
  • For 32-bit systems: <db_agent_home>\auth\x86

Increase the JVM Memory

To monitor multiple databases, you may need to increase the JVM memory allocation size. Increased activity on the databases you are monitoring results in increased memory usage.

Use one of the following commands to start the agent, and to initially allocate 1536 MB to the agent instead of the default of 64 MB.

For Windows 64-bit

C:\java -Xmx1536m -Djava.library.path="<db_agent_home>\auth\x64" -jar <db_agent_home>\db-agent.jar

For Linux

% java -Xmx1536m -jar <db_agent_home>/db-agent.jar