Large applications need additional support to define whether they are feasible or not, that is to say, to confirm that they are not sure-fail applications.
In general it is required to get information on the system's behavior, identify critical application spots and establish if it will be necessary to reprogram them or modify their settings to change the detected behavior.
By setting Enable Management Property (JAVA) or Instrumented Property (NET) it is possible to monitor applications to help in the 'diagnosis' explained previously. As it runs, the application shows information in a console, such as variables related to the connection pool, users, cursors, statements, procedures, etc.
See Management and Performance information using JMX or WMI for detailed information about this topic.
In addition to publishing application variables, it allows you to change certain variables instantly through the console:
- Set a larger size for the connection pool
- Recycle the connection pool
- Kill a JDBC connection
You can also execute certain operations such as dumping the connection pool information to a file, or generating notifications when a variable reaches a value for which a prompt is to be triggered.
In Java, it is implemented using JMX standard, which allows using any of the JMX monitors existing in the market to visualize the information.
1. There is a property at model level: Enable Management Property, which must be set to YES. This property allows displaying information to evaluate the system behavior.
2. Then, you need to start the application server with the following System properties:
3. Afterwards, you need to start a JMX monitor displaying the information. As an example, it may be JConsole.exe, which comes with JDK 1.5 or upper, located in its bin directory (there are other tools available, see the links below in this document).
(1) - MachineName is the name or IP of your application server. In some cases using firewall the connection may not work because JMX creates extra connections in dynamic ports. Check the port with the following command and enable it to connect remotely:
netstat -tulpn | grep java
If your application server is hosted on the Cloud, check the configuration with your provider, for example if you use Amazon, extra configuration is needed, check here or here.
(2) AWS Environment:
-Dcom.sun.management.jmxremote.hostname=JMX_REMOTE_IP instead of -Dcom.sun.management.jmxremote.host
In .NET, it is implemented using WMI standard, which allows using any of the WMI monitors existing in the market to visualize the information.
Monitoring can be done on any product that supports WMI (Windows Management Instrumentation). WMI enables you to record and issue a class instance, in order to obtain information about the application at runtime (resources such as memory or processor and errors can be monitored with WMI).
There are two large "packs" implemented.
This pack indicates the application’s current behavior. It is mainly especially useful in production, to establish determine when you have to make certain adjustments have to be made to the application adjustments to improve its performance. It may also be also useful to find possible errors such as lost connections, locked users, etc.
This pack was mainly conceived to be used before the application release, although it can be also used in production. It provides information related toabout the procedures and the SQL statements executed by the application. It allows identifying the most executed procedures or statements that are executed more often, the ones taking that take more time, etc.
Within these two large packs, the information is grouped in smaller packs indicating the type of information to be shown.
1. There is a property at model level:Enable Management property, which must be set to YES. It only affects the client.exe.config file, with the following line <add key="Instrumented" value="1"/> and allows displaying information to evaluate the system behavior.
2. Before running the application register the WMI schema with the following command using Visual Studio Command Prompt (the installutil.exe tool comes with .Net Framework):
If you want to monitor an RMI 3-tier application you must start a WMI monitor displaying the information. As an example, it may be WMI CIM Studio. Open it on the rootGeneXus namespace.
Monitoring Java applications