All Products
Search
Document Center

Application Real-Time Monitoring Service:How do I deploy multiple instances on a single host?

Last Updated:Mar 11, 2026

To deploy multiple instances of an application on a single host, set the -Darms.agentId parameter to a unique value for each JVM process, such as 001, 002, or 003. This parameter specifies the JVM process to connect to.

Example

# Instance 1
java -javaagent:/{user.workspace}/ArmsAgent/aliyun-java-agent.jar \
  -Darms.licenseKey=<LicenseKey> \
  -Darms.appName=<AppName> \
  -Darms.agentId=001 \
  -jar demoApp.jar

# Instance 2
java -javaagent:/{user.workspace}/ArmsAgent/aliyun-java-agent.jar \
  -Darms.licenseKey=<LicenseKey> \
  -Darms.appName=<AppName> \
  -Darms.agentId=002 \
  -jar demoApp.jar

Replace the placeholders with your actual values:

PlaceholderDescriptionExample
{user.workspace}Absolute path to the ARMS agent installation directory/home/admin
<LicenseKey>ARMS license key for your applicationLTAI5tXxx
<AppName>Application name registered in ARMSmy-order-service
Note

The -javaagent argument must appear before the -jar argument. It is a JVM option, not an application argument.

Note

For ARMS agent versions earlier than 2.7.3.5, replace aliyun-java-agent.jar with arms-bootstrap-1.7.0-SNAPSHOT.jar. Upgrade to the latest agent version to access current features and fixes.