Managing
the Data Server Using JMX
The Data Server is instrumented
with JMX to allow you to manage and monitor the clients and application
settings, and troubleshoot an unresponsive server. To enable JMX, you must run the Data Server in socket mode and
using the -jmxport command line option:
-jmxport:(port number)
The JMX
Monitor demo, located in demos\jmxmonitor in your RTView installation, shows how to use RTView to monitor the
Data Server using JMX.
This section describes the following MBeans
on the Data Server:
RTViewDataServer:name=Manager
Use the RTViewDataServer:name=Manager
MBean to manage and monitor the clients and application settings. The RTViewDataServer:name=Manager
MBean has methods described in the following
table.
Method/Attribute |
Type |
Description |
ClientData |
TabularData |
For
each client connection, the table contains the following columns.
Client
ID - A unique number assigned by the Data Server to this client connection.
The first client connection is assigned an ID of 1, the second is assigned
an ID of 2, etc. The ID for an HTTP/HTTPS client will contain extra digits,
starting with the ID of the Data Servlet's connection. For example, if
the servlet is assigned a client ID of 1, then the first HTTP/HTTPS client
will be assigned an ID of 10001, the next will be 10002, etc. ID numbers
will not be reused during a Data Server session. |
Address
- IP address of the client. Clients running on the same host as the Data
Server will display the IP address 127.0.0.1. |
Host
- Name of the host on which the client is running. Clients running
on the same host as the Data Server will display the host name
localhost.
If a client's host cannot be determined, the IP address will be shown instead. |
Duration
- Time elapsed in this client's session with the Data Server. |
Last
Data Sent - Number of characters of XML data contained in this client's
most recent update. |
Total
Data Sent - Number of characters of XML data contained in all updates
during this client's session with the Data Server. |
|
NumberOfClients |
int |
Number of currently connected
clients. |
ServingData |
boolean |
True if the Data Server
is currently serving data, false otherwise. |
Port |
int |
The Data Server port number. The default is port 3278.
This property is read-only. |
PrimaryServer
|
boolean |
True if the Data Server
is currently the primary server in a redundant pair, false if this server is currently the
backup server in a redundant pair. If the server is not in a
redundant pair, the value is always true. This property
is read-only. |
ProxyFor
|
string |
If the server is currently a backup server (that is, if
PrimaryServer is false) this contains the host:port of the server that is currently the primary
(to
which this server forwards all client requests as a proxy). This is empty if
the server is currently the primary
server. This property is read-only. |
The RTViewDataServer:name=Manager
MBean
also supports the following commands:
Method/Attribute |
Description |
startServingData |
Start serving data. |
stopServingData |
Stop serving data. |
RTView:name=Troubleshooting
Use the RTView:name=Troubleshooting MBean to
detect and troubleshoot
an unresponsive server.
The Data Server, Display Server, and Historian
support the RTView:name=Troubleshooting MBean. To
attach data to the MBean on an RTView display, enter RTView:name=Troubleshooting
in the MBean Name field of the JMX Attach To Data dialog. To
access the MBean in jconsole, select the MBeans tab, then click RTView
/ Troubleshooting in the tree (jconsole must be connected to the RTView
server process).
The RTView:name=Troubleshooting MBean has methods described in the following
table.
Method/Attribute |
Type |
Description |
ConnectionRequestCount |
int |
The total
number of socket connection requests received from clients. NOTE: The Data Server recycles unused client connection numbers if
it reaches its internal limit of 10,000. This can be an issue if client
applications from RTView versions prior to 5.9 attempt repeatedly to connect
to the Data Server. |
ConnectionRequestFailedCount |
int |
The
total number of socket connection requests that failed due to a
client/server software version mismatch or because the client is not an
RTView client. NOTE: The Data Server recycles unused client connection numbers if
it reaches its internal limit of 10,000. This can be an issue if client
applications from RTView versions prior to 5.9 attempt repeatedly to connect
to the Data Server. |
DeadlockCount |
int |
The count of
deadlocked threads. In a healthy server the count is always zero (0).
This attribute is only updated every 30 seconds to reduce overhead.
If JDK 1.6 is available, use the
jstack
utility to obtain more information about the deadlocked threads. |
LastUpdateTime |
int |
The time at which
the server's main update timer most recently changed. In a healthy server,
this time changes on each update interval (by default, 2 seconds). If
the time stops changing for an extended period, it indicates that the timer
thread has stalled or terminated. |
UncaughtExceptionCount |
int |
The count of
uncaught exceptions since server started. In a healthy server the count is
always zero (0). An uncaught exception terminates the executing
thread. |
UncaughtExceptions |
int |
A table of the
server's uncaught exceptions listing the type, time, executing thread, and
code location for each exception. (For each exception, a stack trace is
also written in the server's log file). |
|