Monitoring
You are looking at an older version of the documentation. The latest version is found here.
Monitoring Data Virtuality Server
You can see the server log in real-time as described in the Logging section. Use tail
(or Tail for Windows if you are not using a Linux system) to read the activity stream from the command line. Additionally, you can monitor the Java process behind the server. We will give a brief description of the tools usable if you want to monitor the Java process for performance counters or network communication.
Process Monitoring on Linux
Linux offers some basic and useful tools out of the box. There are four tools which help monitor and trace the server process: top, htop, netstat and tail. The tools top and htop allow you to follow the resource consumption of the programs and services running on the machine. Maybe the htop tool is not yet installed (top most certainly is), but you can quickly get it via apt, yum, or the package manager you use on the system. The netstat command-line tool is useful to see your system's TCP and UDP connections, and you can combine it with grep to filter the output table. After you noted the process id (PID) of the Data Virtuality Server process, you can execute netstat -aon | grep %PID%
and receive all bindings that the server uses for connections as well as the listening port and IP. The last tool, tail, opens a file and will automatically refresh and show you the last lines of the file you are watching. This is an excellent way of real-time auditing the server and checking for anomalies. All the tools are command-line and can be started from a terminal session.
Overview of typical monitoring tools:
- top and htop;
- netstat (use
netstat -aon | grep %PID%
to get all network data from a specific process); - tail.
Process Monitoring on Windows
On Windows, you can use the standard tools that are provided by the system. The Task Manager can be used to check which processes are running and what their resource consumption is. Go to the Resource Monitor to have a graphical visualization of different performance counters. Not only can the CPU and RAM usage be audited, but the network rate and disc performance are also displayable. If you want some information but do not care about visualization in the form of small graphs, you can modify the Task Manager slightly to give more details about the running processes. This is also very useful when you want to have the process id (PID) used for the Data Virtuality Server. For example, you can use this information to check which ports the Data Virtuality Server is listening on and whether there are any open connections to remote hosts with the command line tool netstat. Start the Task Manager and go to the Processes tab. Then click on the menu item View and choose Select columns. Now you have a variety of extra columns to monitor your server's performance. After you have checked the PID of the Data Virtuality Server process, you can use the command-line tool netstat and the parameters -aon to get a list of all processes with their TCP and UDP connections.
Overview of typical monitoring tools
- Task Manager and Resource Monitor (Windows built-in for performance auditing);
- netstat (Windows built-in command-line tool to check and manage network connections and configurations);
- Tail for Windows (Third-party software to watch log files in real-time).
Local and Remote Monitoring using JConsole
If you want to monitor the Java Virtual Machine encapsulating the Data Virtuality Server in detail, use the tool JConsole. Once the JDK is installed, it is part of the Java JDK available on both Linux and Windows systems. Typically, after the installation, you have a bin folder somewhere on your system (e.g., /usr/lib/jvm/java-7-oracle/bin on Linux or C:\Program Files\Java\jdk1.7.0_60\bin on windows) where the jconsole is located. After obtaining the PID of the Data Virtuality Server via top (Linux) or Task-Manager (Windows), you can run jconsole
via one of the following commands:
Connecting JConsole to a DataVirtuality Server instance
jconsole $PID$
example: jconsole 3225
jconsole %host%:%Port%
example1: jconsole myserv.mycorp.local:9999
example2: jconsole 155.2.113.9:9999
You can also execute jconsole
and enter the connection parameter by hand. Note that the PID-based connection is only possible for local instances. Any remote management requires the connection via host and port.
Please note that the default jconsole
management port for the Data Virtuality Server is 9999
. If you want to change it, you have to modify the dvserver-standalone.xml file at the tag <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
. Remember to open the port by a firewall rule. For more information about ports, see Network Configuration.
System Tables to Monitor
As it is possible to access the system tables and procedures via JDBC or ODBC, most monitoring systems can easily check them using simple SQL queries.
SYSADMIN.ScheduleJobRun
- To check for failed jobs, you can check for
status = 'failed'
and get thefailureReason
; To look for long-running queries, you can check, for example, queries that are running longer than 60 seconds with the following statement:
SQLSELECT sqlCommand,startTime,endTime,status,failureReason FROM SYSADMIN.ScheduleJobRun WHERE TIMESTAMPDIFF( SQL_TSI_SECOND, startTime, endTime ) > 60
See Date and Time Functions for other time intervals to check and Jobs and Schedules for more information.
SYSADMIN.Queries
This table enables you to monitor all queries that have been issued against the Data Virtuality Server.
In this example, we are checking for queries running for more than 60 seconds:
SELECT query,startTime,endTime,status,failureReason FROM SYSADMIN.Queries WHERE TIMESTAMPDIFF( SQL_TSI_SECOND, startTime, endTime ) > 60
See Date and Time Functions for other time intervals to check.
SYSADMIN.getAllDataSourcesMetadataDiff()
This procedure returns metadata difference for the specified data source:
SYSADMIN.getDataSourceMetadataDiff(IN name string)