FusionReactor is a full-blown APM, but let’s keep the comparison fair
Before comparing both tools, we want to emphasize that jcmd
can only take statistics snapshots of the running JVM process which were available at the time of execution. On the other hand, FusionReactor is a complete monitoring tool that supports a huge range of monitoring options including Garbage collector, Heap allocations, JDBC, Web performance, Live debugging, and a lot more. To be fair, we will only compare features that are available in both tools.
Console vs Web
The first big difference comes with the way both tools are launched. FusionReactor offers a web interface to monitor your JVM processes. The interface can be launched locally or through the Cloud in order to monitor remote processes in a production environment. On the other hand, jcmd
can only be used within a terminal. Most people who get used to a great user experience offered by web or desktop apps will not feel comfortable opening the terminal to monitor the performance of the underlying application. Moreover, jcmd
can only get snapshots of the JVM processes that run on the same host which means that jcmd
does not support remote processes. In order to use jcmd
in production, the developer will have to have ssh access to the remote machine. However, with FusionReactor it’s a matter of opening your browser.
Troubleshooting Threads
As was shown above, jcmd
can print the stack traces of all threads running in the JVM with the following command jcmd <process id/main class> Thread.print
. For regular Servlet-based backends with a few hundred threads serving user requests, the output will be unreadable. Developer must rely on other utilities such as grep
or awk
in order to get the stack trace of the Servlet Thread, they are interested in. On the other hand, FusionReactor offers a separate page that covers all Thread-related information.