1

I run tomcat process by this command in python :

os.execve(cmd, [cmd, "run"], env)

The env variable sets CATALINA_OPTS = -server -Xms512m -Xmx512m -Xss512k Now when i run the script following java process is shown in ps output :

java -server -Xms512m -Xmx512m -Xss512k org.apache.catalina.startup.Bootstrap start

My question is why CATALINA_OPTS getting shown up in ps output of java process even though CATALINA_OPTS is an environment variable?

2 Answers 2

0

Typically the catalina.sh script is invoked via a wrapper as a sysvinit script. It loads the environment variable and uses it as an argument to the java process that ultimately calls tomcat.

0

I opened catalina.sh script to read the code :

Found this line :

eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \

The catalina.sh script invokes a java process passing $CATALINA_OPTS arguments to the java process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .