search cancel

How to add java arguments to start up scripts


Article ID: 90193


Updated On:


CA Automic Applications Manager (AM)


How to add java arguments to start up scripts


Release: AAMOS499000-8.0-Automic Applications Manager-OS400 Agent


Detailed Description and Symptoms

?There are several ways to do this and it depends on what processes the customer wants to add the extra parameters to (RmiServer, AgentService, or both). Take a look at the start commands in the file. This is the file that starts the two java processes and you can see the commmand line and then the variables you can set in sosite.


In the function to start the RmiServer the following is the command we use: 

$command = "$spawn -p $pidfile \"$java -DAGENT=$OPER $Xrs -Xmx$java_mb $START_OPTION_RMI -DAW_HOME=$AW_HOME -DOsType=$OSTYPE $rmidebug\" 1>$logfile 2>&1";


The java_mb or START_OPTION_RMI variable are both configurable, depending on how you would like to set it. For example, from my sosite:

START_OPTION_RMI="-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:$AW_HOME/log/java.log";export START_OPTION_RMI

Then when I start my processes, you can see my RmiServer has these parameters:
[email protected]:/u01/users/qa4/qa4/v80 > ps -ef|grep qa4 |grep java
qa4 4465 1 19 17:38 pts/4 00:00:08 java -DAGENT=KLW_X80 -Xmx1024m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:/u01/users/qa4/qa4/v80/log/java.log -DAW_HOME=/u01/users/qa4/qa4/v80 -DOsType=UNIX
There is a similar variable for the AgentService process called START_OPTION_AGENT.