Monitoring JVM with CULA(EN)

by Kuba


Posted on Wed Feb 07 08:40:00 GMT 2018


View of Cula
JVM MONITORINGCULA

Monitoring one's server resources is crucial as we have already learnt in our previous articles. However, if you are running a JVM on your server, there are more important things to monitor.

Java has a number of built-in tools which let us get information about each of your JVMs running on the machine. Some of them are: jstat, jmap and jstack

Let's focus on the first one: jstat. It allows us to collect information about the JVM utilization and gargabe collector statistics. Those two metrics are very interesting for every conscious JVM user. With the use of jstat command and awk we can pretty easily monitor the JVM Heap Utilization. Below, there is an example of a bash function doing so.

JVM Heap Utilization Code Example

The other aforementioned metric - full garbage collection time - is very similar.

JVM Garbage Collection Code Example

If you are wondering what those functions are or what they are for, it means that you need to read our tutorials for Windows and Linux users.

After implementing our functions, executing the script and waiting for some time, our charts in CULA are ready.

CULA charts with GC and Heap

Sign into CULA and begin using our server monitoring straight away. Be as creative as you need to be.

Cula, Katowice, Poland