Java Runtime Monitor provides out-of-the-box remote monitoring and management on the Java platform and of applications that run on it. It monitors performance metrics like Memory (JVM), Garbage Collection (GC) and Thread Statistics. Thresholds can be associated and alarms generated. Further, operations such as Automated Thread dump, Heap dump and Perform GC for management are also supported. The different JVM vendors supported by Applications Manager are Sun JVM, IBM JVM and Oracle JRockit JVM.
In this help document, you will learn how to get started with Java monitoring along with the list of parameters that are monitored using Applications Manager.
Prerequisites for Java Runtime Monitor: Know more about the JVM arguments to add to your application for Java Runtime Monitoring
Using the REST API to add a new Java Runtine monitor: Click here
Java Runtime Monitor checks the availability, response time, connection time (time taken by the Applications Manager to look up the JMX agent on the remote JVM) of the monitor, along with many other parameters listed below.
Parameter | Description |
---|---|
Monitor Information | |
Name | Name of the JavaRuntime monitor. |
Health | Specifies the health (Clear, Warning, Critical) of the JavaRuntime monitor |
Type | Specifies the type you are monitoring. |
Host Name | Specifies the host at which the Java virtual machine is running. |
Port | Specifies the port number at which the Java virtual machine is running. |
Host OS | Specifies the OS of the host where the JavaRuntime monitor is running. |
JVM | Specifies the Java virtual machine name and version. |
Vendor | Specifies the Java virtual machine Vendor Name. |
Processor Count | Specifies the number of processors available to the Java virtual machine. |
Last Polled at | Specifies the time at which the last poll was performed. |
Next Poll at | Specifies the time at which the next poll is scheduled. |
Availability | Shows the current status of the JavaRuntime monitor - available or not available. |
Connection Time | Time taken to connect to the Java virtual machine. |
Memory Pool | |
Eden Space (Heap Memory) | The pool from which memory is initially allocated for most objects. |
Survivor Space (Heap Memory) | Pool containing objects that have survived GC of eden space. |
Tenured Generation (Heap Memory) | Pool containing objects that have existed for some time in the survivor space. |
Java Heap | Space where the JVM stores the objects. |
Permanent Generation (Non-Heap) (for versions older than JDK 1.8) | Holds all the reflective data of the virtual machine itself, such as class and method objects. With JVMs that use class data sharing, this generation is divided into read-only and read-write areas. |
MetaSpace (for JDK 1.8) | The Native memory space for the representation of class metadata is called Metaspace. MetaSpace use native memory to store meta-data and that grows automatically. |
Compressed Class Space (for JDK 1.8) | Compressed Class Space contains only class metadata. |
Code Cache (Non-Heap) | Memory used for compilation and storage of native code. |
JIT Code Cache | Memory that is converted to assembler and stored for running at higher speed. |
Nursery | Separate space for newly allocated objects. |
Class Loading | |
Classes loaded | Number of classes loaded |
Classes Unloaded | Number of classes unloaded |
JVM Statistics | |
CPU Load | Specifies the percentage of load on the machine caused by the JVM. 0 indicates no load is created and 100 indicates all load is created by the JVM |
CPU Usage | This indicates the CPU usage of the JVM on the server. |
Max file descriptor | Maximum permissible open file descriptor. Available only for UNIX. |
Host Memory | |
Total Physical Memory | Total amount of physical memory in Megabytes. |
Free Physical Memory | The amount of free physical memory in Megabytes. |
Total Swap Space | Total amount of swap space in Megabytes. |
Committed Virtual Memory | The amount of virtual memory that is guaranteed to be available to the running process in Megabytes. |
Garbage Collection in Java is an automated memory management process wherein the objects that are no longer needed or used are deleted/removed and helps to reclaim unused runtime memory. Using the Perform GC button, Applications Manager's Java Runtime monitor allows you to perform the Garbage Collection process and helps to free up memory for the monitored Java application. Once GC is performed, you can view the difference in memory for your application by clicking the View Impact button.
Parameter | Description |
---|---|
Garbage Collector | |
Time Spent/Min | Approximate collection elapsed time in milliseconds. |
Collections/Min | Total number of collections that have occurred. |
Thread Count | Number of threads used for Garbage Collector. |
Last Start Time | Start time of this GC. |
Last End Time | End time of this GC. |
Memory usage before GC | Memory usage of all memory pools at the beginning of this GC. |
Memory usage after GC | Memory usage of all memory pools at the end of this GC. |
GC time | Time taken to perform garbage collection. |
Compile time | Time spent in just-in-time (JIT) compilation. |
Parameter | Description |
---|---|
Thread Parameters | |
Total threads started | Total number of threads created and also started since the Java virtual machine started. |
Peak Threads | Peak live thread count since the Java virtual machine started or peak was reset. |
Live Threads | Number of live threads currently running. |
Daemon Threads | Number of daemon threads currently running. |
Runnable Threads | A thread executing in the Java virtual machine is in this state. |
Blocked Threads | A thread that is blocked waiting for a monitor lock is in this state. |
Waiting Threads | A thread that is waiting indefinitely for another thread to perform a particular action is in this state. |
Timed waiting Threads | A thread that is waiting for another thread to perform an action, for up to a specified waiting time is in this state. |
Deadlocked | Number of threads that are in deadlock waiting to acquire object monitors. |
Thread Dump is basically a file that contains the state of all the threads or the snapshot of all the threads of a Java application at a particular instance of time. Application Manager's Java Runtime monitor allows you to view the current thread dump details for the monitored application by clicking the View Thread Dump button. Clicking this button will open up in a new window where you will be able to view the current thread dump details. Upon closing this window, the thread dump details will be added under the Thread Dump - History section along with the timestamp, where you can view this information any time you want.
Parameter | Description |
---|---|
Configuration Information | |
Uptime | The uptime of the Java virtual machine. |
Java Virtual Machine | The Java virtual machine implementation name. |
Vendor | The Java virtual machine implementation vendor. |
Process ID | The process identifier is a number used by some operating system kernels to uniquely identify a process. |
Name | The name representing the running Java virtual machine. |
VM arguments | The input arguments passed to the Java virtual machine which does not include the arguments to the main method. |
Class path | The Java class path that is used by the system class loader to search for class files. |
Library path | The Java library path. |
Boot class path | The boot class path that is used by the bootstrap class loader to search for class files. |
JIT compiler | The name of the Just-in-time (JIT) compiler |
Objects Pending for finalization | The approximate number of objects for which finalization is pending. |
Operating System | The name of the operating system. |
Architecture | The operating system architecture. |
Processors | The number of processors available to the Java virtual machine. |
Max Metaspace | The maximum metaspace containing all other large class metadata including methods, bytecode ,constant pool etc. |
Max non-heap | Max Non Heap = Commit Non Heap + free Physical Memory.
Note: In case of Virtual Memory also, we consider only Free Physical Memory to calculate Max Metaspace value. |
The table below lists the different JVM vendors supported by Applications Manager and the major parameters monitored by them.
Parameters Monitored | Sun JVM | IBM JVM | JRockit JVM |
---|---|---|---|
Connection Time | |||
Memory Usage | |||
CPU Usage | |||
CPU Load | |||
System Memory | |||
Process Memory | |||
Heap Memory | |||
Non Heap Memory | |||
VM Statistics | |||
Total Physical Memory | |||
Free Physical Memory | |||
Total Swap Space | |||
Free Swap Space | |||
Committed Virtual Memory | |||
Garbage Collector- Summary | |||
Garbage Collector - View impact for specific collector | |||
Total Threads Started | |||
Peak Threads | |||
Live Threads | |||
Runnable Threads | |||
Blocked Threads | |||
Waiting Threads | |||
Timed Waiting Threads | |||
Daemon Threads | |||
Deadlocked | |||
Configuration Details | |||
JVM Actions |
You can also view the real-time and historical data of any of the attributes present under the Configuration Information section in the Configuration tab. Clicking on any of these attributes will open up a new window named History Data that provides more information about these attributes. Following information can be viewed under this History Data window:
If you want to view data of multiple attributes, click the Customize Columns link present at the top left corner of the window. This will take you to the Edit Global Viewscreen. In this screen, you can change the monitor type using the Filter by Monitor Type drop-down box, select the metrics to be displayed, and show monitors on a monitor basis or a monitor group basis. After you select your options, click the Show Report button to view those information in the Global View tab.
Note: If JMX connection is not being established in the machine where Applications Manager is installed, use this key and restart your application:
-Djava.rmi.server.hostname=YOUR_IP
Thread Dump is basically a file that contains the state of all the threads or the snapshot of all the threads of a Java application at a particular instance of time. Application Manager's Java Runtime monitor allows you to view the current thread dump details for the monitored application by clicking the View Thread Dump button. Clicking this button will open up in a new window where you will be able to view the current thread dump details. Upon closing this window, the thread dump details will be added under the Thread Dump - History section along with the timestamp, where you can view this information any time you want.
Heap Dump is snapshot of all the objects that are on the heap memory and are being used by the Java application at a particular instance of time. Application Manager's Java Runtime monitor allows you to generate the current heap dumps for the monitored application by clicking the Heap Dump button. Clicking this button will generate the heap dump for the particular instance of time and create a hprof file. Upon generating heap dump, the heap dump details will be added under the Heap Dump - History section along with the timestamp, where you can view this information any time you want.
Garbage Collection in Java is a automated memory management process wherein the objects that are no longer needed or used are deleted/removed and helps to reclaim unused runtime memory. Using the Perform GC button, Applications Manager's Java Runtime monitor allows you to perform the Garbage Collection process and helps to free up memory for the monitored Java application. Once GC is performed, you can view the difference in memory for your application by clicking the View Impact button.