• General
  • Monitoring the Server through JConsole (before 4.0)

Lightstreamer features JMX support, though only a partial implementation of the provided mbeans is available (see the javadoc-style documentation for details; the online description of the methods is not implemented).
In Vivace edition, this allows remote management and monitoring. In the other editions, only remote shutdown is allowed.

Lightstreamer's own JMX agent can be accessed from jconsole by attaching to it as a "Remote Process". With the default configuration (see <rmi_connector_port> in the Server configuration file), the URL to be used is:
service:jmx:rmi:///jndi/rmi://localhost:8888/lsjmx
The JVM "platform mbeans" are not supplied by Lightstreamer's own JMX agent; they can be got from the JVM's default JMX agent; obviously, they are available in any edition.
The JVM's default JMX agent can be easily accessed from jconsole locally, by attaching to it as a "Local Process".

If the Server is running on a remote host, the JVM's default JMX agent can be accessed from jconsole through RMI.
This requires that access to the agent from a different host is allowed. The simplest way to achieve this is to edit the launch script ( bin\unix-like\LS.shor bin\windows\LS.bat ) and add the following parameters to the JVM:
-Dcom.sun.management.jmxremote.port=[I]<some-port>[/I]
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=[I]<hostname>[/I]
where <some-port> is a free port and <hostname> is a name by which the host running the Server can be addressed.
In this way, it will be possible to access the JVM's default JMX agent remotely from jconsole through the following URL:
service:jmx:rmi:///jndi/rmi://[I]<hostname>[/I] :Smile_Ah: I]<some-port>[/I]/jmxrmi
In this case, access to all ports, not just <some-port>, should be allowed to the remote client, because the agent requires that a second port is used and, as far as we know, the JVM's RMI implementation chooses this port at random and it cannot be configured.

If the Server is running as a service under Windows, some security issues may prevent the access to the JVM's default JMX agent even locally.
However, the agent can still be accessed through RMI in a way similar to the remote access case. Just edit the "conf\wrapper.conf" file and add, after the line
wrapper.java.additional.2=-server
the following lines:
wrapper.java.additional.3=-Dcom.sun.management.jmxremote.port=[I]<some-port>[/I]
wrapper.java.additional.4=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.5=-Dcom.sun.management.jmxremote.ssl=false
then access the JMX agent from jconsole as a "Remote Process" with the following URL:
service:jmx:rmi:///jndi/rmi://localhost :Smile_Ah: I]<some-port>[/I]/jmxrmi
Moreover, in the latter case, by adding the further lines
wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
wrapper.java.additional.7=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.
testing=true
some mbeans supplied by the third party "Java Service Wrapper" are also made available by the JVM's default JMX agent.
3 months later
Hi, we're not in Java world, but rather .NET, so monotoring via JMX is unfamiliar to us. So what kind of monitoring is it, is it possible to monitor current connections and such? At the moment we run on a moderato version, and we're wondering if there's any capabilities that support such monitoring (connections), preferely from .NET. As I can figure out, the data adapter is not aware of the state of the server regarding this matter.

brgds
Robert
5 days later
Hi Robert

Please find here a resume of the information available through the JMX interface.
The documentation is in javadoc format, though the JMX interface is not necessarily a java interface. Note that some of the available methods are not implemented yet.

I don't know if there are tools which allow a .NET program to connect to a JMX server. I think there are, as the JMX specifications were designed with interoperability in mind.

As JMX support is not available in the free edition, in order to evaluate it you should download the Allegro/Presto/Vivace package and get a trial license.

While in Moderato version, the only monitoring features available are the monitoring console (see GETTING_STARTED.TXT) and the logging of monitoring data (look for LightstreamerMonitorText and LightstreamerMonitorTAB in lightstreamer_log_conf.xml).
No support is available for importing these statistics from external programs.

Dario