FusionReactor is a full-blown APM, but let’s keep the comparison fair
When considering alternatives to jstack and jcmd 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 (GC), heap allocation, 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.
As was shown above, jcmd (same as jstack) 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. Developers 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. In the production environment, most of our clients had ended up with a lot of bash scripts that present the output from jcmd in a human-readable form. Moreover, the output from jcmd gives you a stack trace as plain text. It has several problems. For example, you can not tell for sure how much memory and CPU were used by the thread. The output from jcmd only shows you the total CPU, consequently, it does not show which method in the call stack took most of the time. Another big issue with plain Strack traces is the user experience. In order to trace the issue, the developer will have to match the methods from the stack trace with the source code by constantly switching between the editor and the terminal. However, you will not have any of these issues using FusionReactor.