Monitoring a Java Application

The prime concern of administrators of Java applications is knowing how well the application is functioning, and how to troubleshoot issues (if any) in the performance of these applications. Most web application server vendors prescribe custom APIs for monitoring – for instance, WebSphere and WebLogic allow administrators to use their built-in APIs for performance monitoring and problem detection.

Besides such applications, you might have stand-alone Java applications that do not provide any APIs for monitoring. To enable users to monitor the overall health of such stand-alone Java applications, eG Enterprise offers a generic monitoring model called the Java Application.

layermodel

Figure 1 : Layer model of the Java Application

Each layer of Figure 1 above is mapped to a series of tests that report critical statistics pertaining to the Java application being monitored. Using these statistics, administrators can figure out the following:

  • Has the Java heap been sized properly?
  • How effective is garbage collection? Is it impacting application performance?
  • Often, Java programs use threads. A single program may involve multiple concurrent threads running in parallel. Is there excessive blocking between threads due to synchronization issues during application design?
  • Are there runaway threads, which are taking too many CPU cycles? If such threads exist, which portions of code are responsible for spawning such threads?
  • Is the JVM managing its memory resources efficiently or is the free memory on the JVM very less? Which type of memory is being utilized by the JVM increasingly?
  • Has a scheduled JVM restart occurred? If so, when?