Monitoring MBeans with JConsole

The Process Monitor data in the Process Admin console shows you only data for the cluster member to which it is connected. You can view information for different cluster members by using a JMX-compliant tool such as JConsole. Each cluster member hosts an instance of the MBean, which can be queried individually to get the full picture.

You can run a script to start JConsole and then view the JMX MBeans that are available for the Process Monitor, and navigate to the MBean for each cluster member to view the data. To view the MBeans for all cluster members, connect JConsole to the Deployment Manager. To view Process Monitor MBeans from JConsole:
  1. Start JConsole by using a script.
    • Example Linux script (filename.sh)
      #!/bin/bash
      ################################################################
      # This script is assumed to run on the same host where the BPM 
      # server is running.
      # Change the variable( $HOST, $PROFILE_NAME, $WAS_VER, $PORT...) 
      # if your environment is different
      ################################################################
      
      PROFILE_NAME=StandAloneProfile
      WAS_VER=8.5.0
      PORT=2809
      
      
      HOST=$(hostname)
      WAS_HOME=$HOME/main/deploy2/AppServer
      JAVA_HOME=$WAS_HOME/java
      
      PROFILE_HOME=$WAS_HOME/profiles/$PROFILE_NAME
      BPM_HOME=$WAS_HOME
      PROVIDER=-Djava.naming.provider.url=corbaname:iiop:$HOST:$PORT
      
      PROPs_HOME=$PROFILE_HOME/properties
      
      FILE_SAS=$PROPs_HOME/sas.client.props
      FILE_SSL=$PROPs_HOME/ssl.client.props
      
      CLIENTSAS=-Dcom.ibm.CORBA.ConfigURL=file://$FILE_SAS
      CLIENTSSL=-Dcom.ibm.SSL.ConfigURL=file://$FILE_SSL
      
      echo "sas file: $FILE_SAS"
      echo "ssl file: $FILE_SSL"
      
      PROPs=
      PROPs="$PROPs $CLIENTSAS"
      PROPs="$PROPs $CLIENTSSL"
      PROPs="$PROPs $PROVIDER"
      echo $PROPs
      
      CLASSPATH=
      CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
      CLASSPATH=$CLASSPATH:$BPM_HOME/runtimes/com.ibm.ws.admin.client_$WAS_VER.jar
      CLASSPATH=$CLASSPATH:$BPM_HOME/runtimes/com.ibm.ws.ejb.thinclient_$WAS_VER.jar
      CLASSPATH=$CLASSPATH:$BPM_HOME/runtimes/com.ibm.ws.orb_$WAS_VER.jar
      CLASSPATH=$CLASSPATH:$BPM_HOME/plugins/javax.j2ee.management.jar
      CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/jconsole.jar
      
      URL=service:jmx:iiop://$HOST:$PORT/jndi/JMXConnector
      
      JARS=$(echo $CLASSPATH |sed s/:/\ /g)
      
      FILE_SETUPCMD=$PROFILE_HOME/bin/setupCmdLine.sh
      
      #detect the require file:
      for file in $FILE_SAS $FILE_SSL $JARS
      do 
          if [ ! -e $file ]
      	then
      	echo "file doesn't exist: $file"
      	exit
          fi
      done
      
      #exit
      . $FILE_SETUPCMD
      
      $JAVA_HOME/bin/java -classpath $CLASSPATH $PROPs  sun.tools.jconsole.JConsole $URL
    • Example windows script (filename.bat)
      @echo off
      REM ############################################################
      REM # This script is assumed to run on the same host where the 
      REM # BPM server is running.
      REM # Change the variable( HOST, PROFILE_NAME, WAS_VER, PORT...)
      REM # if your environment is different
      REM ############################################################
      
      set PROFILE_NAME=
      set WAS_VER=8.5.0
      set PORT=2809
      
      
      set HOST=
      
      REM ************************************************************
      REM PD_HOME is the Process Designer installation path, to reference 
      REM to the properties file for connection.
      REM ************************************************************
      set PD_HOME=
      set JAVA_HOME=
      
      REM ******************************************************************
      REM BPM_HOME is a directory that stores the necessary jar files copied 
      REM from the server
      REM ******************************************************************
      set BPM_HOME=
      set PROVIDER=-Djava.naming.provider.url=corbaname:iiop:%HOST%:%PORT%
      
      set PROPs_HOME=%PD_HOME%/resources
      
      set FILE_SAS=%PROPs_HOME%/sas.client.props
      set FILE_SSL=%PROPs_HOME%/ssl.client.props
      
      set CLIENTSAS=-Dcom.ibm.CORBA.ConfigURL=file:///%FILE_SAS%
      set CLIENTSSL=-Dcom.ibm.SSL.ConfigURL=file:///%FILE_SSL%
      
      echo "sas file: %FILE_SAS%"
      echo "ssl file: %FILE_SSL%"
      
      set PROPs=%CLIENTSAS%
      set PROPs=%PROPs% %CLIENTSSL%
      set PROPs=%PROPs% %PROVIDER%
      
      echo "props: " %PROPs%
      
      REM *******************************************************************************
      REM the following jar files in the directory of BPM_HOME should be copied 
      REM from the server 
      REM *******************************************************************************
      set CLASSPATH=%JAVA_HOME%\lib\jconsole.jar
      set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
      set CLASSPATH=%CLASSPATH%;%BPM_HOME%\com.ibm.ws.admin.client_%WAS_VER%.jar
      set CLASSPATH=%CLASSPATH%;%BPM_HOME%\com.ibm.ws.ejb.thinclient_%WAS_VER%.jar
      set CLASSPATH=%CLASSPATH%;%BPM_HOME%\com.ibm.ws.orb_%WAS_VER%.jar
      set CLASSPATH=%CLASSPATH%;%BPM_HOME%\javax.j2ee.management.jar
      
      
      set URL=service:jmx:iiop://%HOST%:%PORT%/jndi/JMXConnector
      
      
      REM FILE_SETUPCMD=$PROFILE_HOME/bin/setupCmdLine.sh
      
      
      REM $FILE_SETUPCMD
      echo "class path: "  %CLASSPATH%
      
      
      REM %JAVA_HOME%\bin\java -classpath %JAVA_HOME%/lib/jconsole.jar;
      REM                 %java_home%/lib/tools.jar sun.tools.jconsole.JConsole %URL%
      REM %JAVA_HOME%\bin\java -classpath %CLASSPATH% sun.tools.jconsole.JConsole %URL%
      %JAVA_HOME%\bin\java -classpath %CLASSPATH% %PROPs% sun.tools.jconsole.JConsole %URL%
  2. In the MBeans tab, locate ProcessMonitor and navigate to the server that you want.
  3. You can see the MBeans operations that are available. Choose the operation that you want to run, enter parameter values, and click the operation to run it.
You can also use MBeans programmatically to extract information in the process instrumentation and monitor pages. For more information, see Process Monitor MBeans reference.