As well as it seems natural to monitor the server hosting the Runtime application, it is also a good practice to monitor the Java Virtual Machine executing the Runtime.
Java Monitoring tools
Depending on your Java version and distribution, there are different tools available to watch the JVM.
For example concerning Oracle Java 8: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr025.html
And for Oracle Java 11: https://docs.oracle.com/en/java/javase/11/management/overview-java-se-monitoring-and-management.html
VisualVM is very handy and it can be downloaded as a standalone application from https://visualvm.github.io/download.html.
Here is how VisualVM lools like when watching a Runtime's JVM:
Note: in production environments, it is not recommended to launch a Monitoring tool such as VisualVM directly on the Server, because it would consume resources. Instead, the Monitoring tool can be started from another machine and then connect to the Remote production JVM through a JMX connection.
This article shows how to enable JMX and use VisualVM for monitoring the JVM of a remote Runtime.
Enabling JMX in the Runtime's JVM
This step is necessary when the Runtime is not located on the same machine as VisualVM.
The idea is to pass startup parameters to the Runtime's JVM.
For example:
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=tbl-debian.local
Note that you need to define a Port so that the JMX client (VisualVM or JConsole) can connect, and a hostname (most likely the runtime server hostname).
These parameters can be set in the "initvariables.bat" (or .sh) script of your Runtime installation, in the STAMBIA_STARTENGINE_VM_PROPERTIES variable:
This example does not use JMX user authentication, please consult Oracle Java documentation for more information on how to enable JMX authentication.
Once the Runtime is started, you can easily check if these parameters are enabled by consulting the Runtime's JVM arguments from the Designer or from Analytics:
Consulting a local JVM with VisualVM
VisualVM lists the local Java processes under the Local node.
The Runtime's JVM is usually named "com.indy.engine.EngineStartI" or "com.indy.engine.launcher.MainLauncher".
To find the desired Runtime JVM, match VisualVM's "pid" information with the Java process id - you can find it in the Runtime view:
Connecting to a remote JVM in VisualVM
In VisualVM, right click the "Remote" to add a Remote host.
Then right click the Host node to add a JMX connection, this is where you specify the Port:
Once you click OK, the Runtime JVM appears under the JMX connection and you can open it: