JVMInfo
JVMInfo (ActiveMatrix BPM JVMInfo Utility) is a command-line tool that you can use to view the current status of a JVM process, for example memory, threads, or classes. You can use it to get a summary, or to monitor the process continuously.
Setup
JVMInfo uses the Java Runtime Environment (JRE) used by ActiveMatrix BPM. However, this JRE no longer ships with the libattach shared library (for example libattach.so on Linux). So, you must locate libattach in a separate JDK's JRE and add this location to the shared library path. For example, on Linux, LD_LIBRARY_PATH can be altered in the shell to include the location of the library:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/java/jdk1.7.0_25/jre/lib/amd64
Similar changes to the library path can be made on other platforms if required.
Running JVMInfo
On Windows, the path of JVMInfo is:
TIBCO_HOME\bpm\version\bin\jvminfo.bat
On UNIX, the path of JVMInfo is:
TIBCO_HOME/bpm/version/bin/jvminfo
Usage
jvminfo [-v] [-b] <process_ID> [<interval> [<count>]]
jvminfo -t <process_ID>
jvminfo -l
The options and variables have the following meanings:
-v | Verbose output. |
-t | Dump thread information. |
-l | List the JVMs running. |
-b | When in Verbose mode, output the memory values in bytes. This gives a more precise figure than when -b is omitted. |
<process_ID> | Process ID of the JVM. |
<interval> | Sampling interval (in seconds). |
<count> | Number of samples to take before terminating. |
Example of Non-verbose Output
In non-verbose mode (-v is not used), memory values are displayed in bytes:
C:\...\bin>jvminfo.bat 4068 1 4 Running JVMs are: [7084, 4856, 4068, 5920] DATETIME,PID,OSNAME,OSVERSION,OSARCH,NAME,VENDOR,VERSION,HEAPCOMMITTED,HEAPUSED,HEAPMAX,NONHEAPCOMMITTED,NONHEAPUSED,NONHEAPMAX,THREADSCURRENT,THREADSPEAK,THREADSDAEMON,THREADSTOTAL,CLASSESLOADED,CLASSESTOTAL,CLASSESUNLOADED 2013/06/04 09:53:35,4068,Windows 7,6.1,amd64,Java HotSpot(TM) 64-Bit Server VM,Sun Microsystems Inc.,20.5-b03,558956544,279721064,1037959168,233111552,230496032,318767104,72,72,65,545,24250,26148,1898 2013/06/04 09:53:36,4068,Windows 7,6.1,amd64,Java HotSpot(TM) 64-Bit Server VM,Sun Microsystems Inc.,20.5-b03,558956544,282121792,1037959168,233111552,230512120,318767104,78,78,71,551,24250,26148,1898 2013/06/04 09:53:37,4068,Windows 7,6.1,amd64,Java HotSpot(TM) 64-Bit Server VM,Sun Microsystems Inc.,20.5-b03,558956544,284522520,1037959168,233111552,230512280,318767104,84,84,77,557,24250,26148,1898
Example of Verbose Output
In verbose mode (-v is used), memory values are displayed in bytes, kilobytes, megabytes, or gigabytes, as appropriate:
C:\...\bin>jvminfo.bat -v 4068 Running JVMs are: [5676, 4856, 4068, 5920] JVM PID = 4068 Local connector address = service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc3AAtVbmljYXN0UmVmMgAADDE5Mi4xNjguMS41MQAAyV7+nQFW8GfdPhCX3t0AAAE/DmJvd4ABAHg= 2013/06/04 09:51:43 =================== OperatingSystem: name = Windows 7 version = 6.1 arch = amd64 Runtime: name = Java HotSpot(TM) 64-Bit Server VM vendor = Sun Microsystems Inc. version = 20.5-b03 Heap: committed = 1.2 GB (23.13%) used = 807.2 MB (15.55%) max = 5.1 GB NonHeap: committed = 27.8 MB (73.13%) used = 27.4 MB (72.30%) max = 38 MB Threads: current = 36 peak = 36 daemon = 29 total = 509 Classes: loaded = 24241 total = 26139 unloaded = 1898 Memory Pool (Code Cache): used = 65.9 KB (1.07%) max = 6 MB . . .
Example of Verbose Output with Memory Values in Bytes
In verbose mode with memory values in bytes (-v -b is used), all memory values are displayed in bytes:
C:\...\bin>jvminfo.bat -v -b 4068 Running JVMs are: [5676, 4856, 4068, 5920] . . . Heap: committed = 1,258,971,136 B (23.13%) used = 952,866,680 B (17.51%) max = 5,442,174,976 B NonHeap: committed = 233111552 B (73.13%) used = 230461848 B (72.30%) max = 318767104 B . . .