![]() |
|
Diagnostics help to identify and analyze the time taken to complete a logical unit of operation and provide details on the time taken by business operations for execution. It helps in distributing time across various sub-tasks and eliminate bottlenecks at runtime. In a complex application environment, monitoring transaction response times is a critical part of optimal application performance and availability.
Server enables you to meet performance and availability service levels. Server monitors predefined or selected Web transactions and provides details of response time. For critical applications, a high level of monitoring, availability, and analysis is necessary. For simple applications such as printing, a lower level of availability and monitoring is sufficient. Server performs the following functions:
You can start and record transactions. The end user response time is also captured. The failure of any component of an application at any level affects other components and degrades its performance. The service level time for an application can be compared and alerts are sent when response time degrades. The Server monitors, reports, stores data in files, and sends alerts when something goes wrong. For more details on alerts, read Managing Alerts.
The components in the Console are made by one or more beans called the Manageable Beans (MBeans), which are either standard or dynamic. The Console uses dynamic MBeans that conform to a specific interface and offers great flexibility at runtime. The usage of MBeans involves various advantages. These objects are simple and easy to implement. Service providers and developers can make their products manageable in a standard way without having to understand or invest in complex management systems. In addition, the MBeans generate and propagate notification events to components of the other levels.
This section covers the following aspects of the Server Diagnostics:
In the Explore panel, select Analyze > Server Diagnostics. The Server Diagnostic page is displayed. You can browse for a specific report and include it in the report list using the Load button.
Click Start. A link to View current data is displayed. Click this link to view diagnostic details in Server.
The following timing diagnostics details are available on the home page:
A J2EE-based application server supports infrastructural services such as transactions. This is used by deployed application components for activities detached from business logic. Transaction service on the Server is based on Java Transaction API (JTA) 1.0.1 specification.
To ensure optimal performance and availability of applications, it is necessary to obtain diagnostic data on transaction response times. To obtain timing diagnostics data for transactions occurring at Server run time:
Table 1: Transaction Diagnostics page
| Name | Description |
|---|---|
| Total Transaction Commit (ms) | Overall time taken to commit all the transactions. |
| Total Transactions Rollback (ms) | Overall time taken for transactions to rollback. |
Table 2: Datasource Diagnostics
| Field | Description |
|---|---|
| Datasources | List of the datasource names accessed to run a particular application. |
| Total Wait Time to Obtain Conn (ms) | The time required to connect to the datasource. |
To view the sorted data from the Console, select Analyze > Sever Diagnostics. Select a deployed application, for example, OrderBook.ear. The results are sorted based on cumulative time, and displayed at three levels:
Consider the example of the bank application.
BankDesk.ear available at <install_dir>\server\samples\ejb11\BankDesk\ear\. Click Deploy to deploy the application.http://127.0.0.1:8181/bankWeb/bank.jsp. Create two accounts, 1111 and 2222 with initial balances of Rs. 5,000 each using the New Account tab. Then, using the Transfer tab, transfer Rs.1,000 from account number 1111 to 2222.Select Transactions. It displays the corresponding details. You can check for the nature and details of transactions. Click on the MBean to view the following details:
Table 3: Method descriptions for Transaction MBean
| Method Name | Description |
|---|---|
| Transaction Commit | Implies that a transaction has been committed. |
| Transaction Heuristic Mixed | Implies that the transaction was not committed because of data corruption. |
| Total Transaction | Indicates the total number of transactions that have occurred. |
| Transaction Rollback | Implies that a transaction has rolled back. |
| Transaction Heuristic Rollback | Implies that the transaction was not committed because of some network problem. The database or resource is not affected by this rollback. |
| Transaction Set Rollback | Implies that the transaction was not committed because of a logic specified in the code. |
You can select the Transaction Commit method from the list and study the drill down on the following page.
Table 4: Datasource details
| Field | Options | Description |
|---|---|---|
| Module Name | - | Refers to the name of the deployed module. |
| JDBC Datasource | - | Displays the JDBC datasource details. |
| - | Datasources | Displays the JDBC datasource name. |
| - | Total wait time to obtain connection (ms) | Displays the total time required to get connected. |
Click on a datasource name to view the following details:
Table 5: Datasource Diagnostics
| Method | This value indicates the |
|---|---|
| wait Time To Obtain Conn | Time taken to obtain a connection from the resource pool. |
| waiting Thread Time | Time taken to wait for a connection from the pool. A requestor may need to wait for a connection because a new connection cannot be created due to the limitation of the pool size. Then, the requestor has to wait for one currently used connection to become available. |
| prep Stmt Obtained From Cache | Number of prepared statements that are retrieved from the cache. |
| new Conn Creation Freq | Number of times a new connection is created. |
| prep Stmt Created Afresh | Number of prepared statements that are created afresh. The ratio of this value and the prepStmtObtainedFromCache value can give you an indication if you need to change the value of the number-of-cached-prepared-statement tag in the server-config.xml file. |
| connection Use Time | Duration for which the connection is in use. |
| conn Available In Thread Context | Number of times an existing connection is made available to the requestor from the same transaction. |
Selecting a method, for example, the connectionUseTime, displays a histogram for it.
Table 6: Application Diagnostic Details
| Field | Options | Description |
|---|---|---|
| Type | - | Refers to the type of the deployed application. For example, J2EE application. |
| Components | - | Displays the wars and jars for the application. |
| - | Wars | Displays the Web modules for the selected application. For example, bankWeb. |
| - | Jars | Displays the Java modules for the selected application. For example, bankEJB.jar. |
Reading Web Modules
Selecting the Web module displays the following details:
Table 7: Web Module Details
| Field | Description |
|---|---|
| Module Name | Refers to the name of the selected Web module. Say, bankWeb. |
| Servlet | Displays the list of servlets for the module, along with the total time taken for the method. |
Reading jar Modules
Selecting the jar module displays the following details:
Table 8: jar module details
| Field | Options | Description |
|---|---|---|
| Module Name | - | The name of the selected jar module, say bankEJB.jar. |
| Entity Bean | - | The details for the entity beans. |
| - | Beans | The name of the entity bean. |
| - | Total Activation Time (ms) | The total activation time for the entity bean in milliseconds. |
| - | Total Passivation Time (ms) | The total passivation time for the entity bean in milliseconds. |
| - | Total Load Time (ms) | The total load time for the entity bean in milliseconds. |
| - | Total Store Time (ms) | The total store time for the entity bean in milliseconds. |
| - | Total Locking Time (ms) | The total locking time for the entity bean in milliseconds. |
| Stateful Session Bean | - | The details for the stateful session beans. |
| - | Beans | The name of the stateful session beans. |
| - | Total Activation Time (ms) | The total activation time for the stateful session bean in milliseconds. |
| - | Total Passivation Time (ms) | The total passivation time for the stateful session bean in milliseconds. |
| Stateless Session Bean | - | The details for the stateless session beans. |
| - | Beans | The name of the stateless session beans. |
| Message Driven Bean | - | The details for the message driven beans. |
| - | Beans | The name of the message driven bean. |
| - | Time taken for MDBeans onMessage method call | The time taken for MDBs onMessage method call. |
Reading Entity Beans
Selecting an entity bean name displays the following details:
Table 9: Reading Entity Beans
| Task name | Time taken |
|---|---|
| create:java.lang.Long;double;java.lang.String;(BusinessMethod) | To execute the applications business method. |
| findByID:long;(BusinessMethod) | To execute the applications business method. |
| findAllAccounts:(BusinessMethod) | To execute the applications business method. |
| lockingTime | To obtain and release a lock by the bean. |
| postProcesingTime | To complete the tasks that are done after processing the actual business methods in the bean. |
| storeTime | To store data. |
| preProcessingTime | To complete the tasks that are done prior to processing the actual business methods in the bean. |
| getCustomer_name:(BusinessMethod) | To execute the applications business method. |
| loadTime | To load data. |
| activationTime | For activation. |
| riLockingTime | To lock a remote bean instance. |
| onPoolWaitingTime | To wait for getting a bean from the bean pool. |
| ejbActivateTime | To call the ejbActivate method. |
| beanGetTime | To get a bean from the bean pool. |
| creatingTime | To create a bean instance. |
| lockRowTime | To lock a row. |
| onCacheWaitingTime | To wait for getting a bean from the cache. |
| debit:double;(BusinessMethod) | To execute the applications business method. |
| getAccount_number:(BusinessMethod) | To execute the applications business method. |
| credit:double;(BusinessMethod) | To execute the applications business method. |
| getBalance:(BusinessMethod) | To execute the applications business method. |
| verifiedUpdateTime | Verify the updation of the bean. |
| activateLoadTime | To activate the load. |
| rollbackLoadTime | To rollback the load. |
| lockWaitingTime | To obtain a lock for the bean. |
| passivationTime | For passivation. |
Selecting the task name displays a histogram for the activity on the same, if there is sufficient data available.
Reading Stateful Session Beans
Selecting a stateful session bean name displays the following details:
Table 10: Reading Stateful Session Beans
| Task name | Time taken |
|---|---|
| createEntry:long;java.lang.String;double;(BusinessMethod) | To execute the applications business method. |
| createEntry:long;java.lang.String;double;(ActualMethod) | To execute the applications actual method. |
| create:(BusinessMethod) | To execute the applications business method. |
| preProcessingTime | To complete the tasks that are done prior to processing the actual business methods in the bean. |
| getLedgerRows:(BusinessMethod) | To execute the applications business method. |
| getLedgerRows:(ActualMethod) | To execute the applications actual method. |
| postProcesingTime | To complete the tasks that are done after processing the actual business methods in the bean. |
| onPoolWaitingTime | To wait for getting a bean from the bean pool. |
| beanGetTime | To get a bean from the bean pool. |
| aliveTime | For which the bean is in existence. |
| creatingTime | To create a bean instance. |
| ejbActivateTime | To call the ejbActivate method. |
| activationTime | For activation. |
| riLockingTime | To lock a remote bean instance. |
| passivationTime | For passivation. |
Selecting the task name displays a histogram for the activity on the same, if there is sufficient data available.
Reading Stateless Session Beans
Selecting a stateless session bean name displays the following details:
Table 11: Reading Stateless Session Beans
| Task Name | Time taken |
|---|---|
| transfer:long;long;double;(BusinessMethod) | To execute the applications business method. |
| transfer:long;long;double;(ActualMethod) | To execute the applications actual method. |
| preProcessingTime | To complete the tasks that are done prior to processing the actual business methods in the bean. |
| beanGetTime | To get a bean from the bean pool. |
| onPoolWaitingTime | To wait for getting a bean from the bean pool. |
| create:(BusinessMethod) | To execute the applications business method. |
| postProcesingTime | To complete the tasks that are done after processing the actual business methods in the bean. |
| creatingTime | To create a bean instance. |
| riLockingTime | To lock a remote bean instance. |
To save and store diagnostic data in the local server:
If there is a conflict between configured number of threads and number of existing threads, necessary steps are taken. If actual number of threads is more than the configured number, some threads are killed; if the actual number of threads is found to be less than the configured number then some new threads are created; if some threads are not alive, new threads are created. The functional details are described in the subsequent sections.
Persistent check on the health of Server socket is also carried out. The Server socket response time is measured. This helps in accessing the performance degradation of Server under load.
server-TXTservermsg.log file which is located in <install_dir>\server\nodes\<node_name>\logs. The message logged when the Server socket is not responding to client requests is provided as an example:
# Start Action Block: (Feb 24, 2006 12:53:35 PM162) Main message ID: WEB0096; SEVERE WARNING:Server Socket is not RespondingSevere; Tip: Messages Trace: WEB1100; Problem occurred. Connection refused: connect: ConnectException while trying to connect to ServerSocket. Retrying...; Info;(web.core.ConnectionIntegrityTester) WEB1100; Problem occurred. Connection refused: connect: ConnectException while retrying to connect to ServerSocket. Please contact Pramati Support.; Info;(web.core.ConnectionIntegrityTester) WEB0096; SEVERE WARNING:Server Socket is not Responding; Severe;(web.core.ConnectionIntegrityTester) Exception Stacks: ## END Action Block RECORD NO:162##
The message logged when a new thread is created appears as given in the following example:
## Start Action Block: (Feb 24, 2006 12:57:12 PM108) Main message ID: WEB0098; new acceptor threads createdInfo; Tip: Messages Trace: WEB0098; new acceptor threads created;Info;(web.core.HttpHealthChecker) Exception Stacks: ## END Action Block RECORD NO:108##
The message generated when a thread is killed appears as:
## Start Action Block: (Feb 24, 2006 1:04:00 PM122) Main message ID: WEB0100; acceptor threads more than configured number.killing extra threads.Info; Tip: Messages Trace: WEB0100; acceptor threads more than configured number.killing extra threads.; Info;(web.core.HttpHealthChecker) Exception Stacks: ## END Action Block RECORD NO:122##
set TEMP=%PATH% call D:\PramatiServer\server\bin\setup.bat java.exe -Dinstall.root=%install.root% -Djava.security.policy=%install.root%\lib\pramati\pramati.java.policy -Djava.security.auth.policy=%install.root%\lib\pramati\pramati.jaas.policy -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Dweb.header.checkintegrity = false com.pramati.Server %1 %2 %3 %4 %5To re-enable this feature, shutdown and restart Server.
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |