Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

Re: JAVA APPLICATION SERVER MONITORING VIA SNMP ADDING JAVA_OPTS to CATALINA.BAT

$
0
0

From -> Configuring Java Virtual Machines for SNMP

Configuring Apache Tomcat (tested on version 7.0)

Windows Service

1.

 

Open Tomcat configuration: Start >All Programs > Apache Tomcat > Configure Tomcat.

2.

 

Open the Java tab, and then add the following lines to the Java Options box:
-Dcom.sun.management.snmp.port=1161
-Dcom.sun.management.snmp.interface=0.0.0.0

3.

 

Click Apply.

4.

 

Go to the Windows Services console.

5.

 

Right-click the Apache Tomcat service.

6.

 

Click Properties.

7.

 

Click the Log On tab, and then select Log on as this account.

8.

 

Click Browse, find the user “Administrator” and type the Administrator password twice.

9.

 

Click OK.

10.

 

In the Tomcat Configuration window, return to the General tab, and then start the service.

 

Windows Command Line

1.

 

Open the file %TOMCAT_HOME%\bin\catalina.bat and add the following lines into the Debug, Run and Start sections (where%TOMCAT_HOME% is the path to your Tomcat installation):

 

set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"


:doDebug
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
shift

:doRun
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
shift

:doStart
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
shift

2.

 

Run %TOMCAT_HOME%\bin\startup.batto start Tomcat.

 

Linux

1.

 

Open$TOMCAT_HOME/bin/catalina.shand then add the following lines into Debug, Run and Start sections (where%TOMCAT_HOME% is the path to your Tomcat installation):

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"


if [ "$1" = "debug" ] ; then
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
if $os400; then

elif [ "$1" = "run" ]; then
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
shift

elif [ "$1" = "start" ] ; then
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
if [ ! -z "$CATALINA_PID" ]; then

2.

 

Run $TOMCAT_HOME/bin/startup.shcommandto start Tomcat.


Viewing all articles
Browse latest Browse all 20396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>