DevPortal

How do I interpret Diagnostics?


Table of Contents


How do I interpret Diagnostics?

Consider the following example of a bank application:

  1. Start the Server.
  2. Using Deploy Tool, open BankDesk.ear available at <install_dir>\server\samples\ejb11\BankDesk\ear\. Click Deploy to deploy the application.
  3. On the Console, select Analyze > Server Diagnostics. It displays the Server Diagnostic home page.
  4. Click Start on the tool bar. It displays a new link to View current data.
  5. Open a browser and start the application by entering the URL as 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.
  6. Click View Current Data. It displays the Diagnostics page.
    Note: The application may run on the local or a remote server. Server collects diagnostic data for both cases. Click Refresh to view the diagnostic data for the request sent to Server.

How do I read Transaction Diagnostics?

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 1: Method descriptions for Transaction MBean

Method NameDescription
Transaction CommitImplies that a transaction has been committed.
Transaction Heuristic MixedImplies that the transaction was not committed because of data corruption.
Total TransactionIndicates the total number of transactions that have occurred.
Transaction RollbackImplies that a transaction has rolled back.
Transaction Heuristic RollbackImplies that the transaction was not committed because of some network problem. The database or resource is not affected by this rollback.
Transaction Set RollbackImplies 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.

How do I read Datasource Diagnostics?

Selecting datasources displays the following details:

Table 2: Datasource details

FieldOptionsDescription
Module Name-Refers to the name of the deployed module.
JDBC Datasource-Displays the JDBC datasource details.
-DatasourcesDisplays 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 3: Datasource Diagnostics

MethodThis value indicates the
wait Time To Obtain ConnTime taken to obtain a connection from the resource pool.
waiting Thread TimeTime 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 CacheNumber of prepared statements that are retrieved from the cache.
new Conn Creation FreqNumber of times a new connection is created.
prep Stmt Created AfreshNumber 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 TimeDuration for which the connection is in use.
conn Available In Thread ContextNumber 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.

How do I read Application Diagnostics?

Selecting Applications displays a list of deployed applications. Clicking an application, say BankDesk.ear, displays the type of the application and the components that make it.

Table 4: Application Diagnostic Details

FieldOptionsDescription
Type-Refers to the type of the deployed application. For example, J2EE application.
Components-Displays the wars and jars for the application.
-WarsDisplays the Web modules for the selected application. For example, bankWeb.
-JarsDisplays the Java modules for the selected application. For example, bankEJB.jar.

Reading Web Modules

Selecting the Web module displays the following details:

Table 5: Web Module Details

FieldDescription
Module NameRefers to the name of the selected Web module. Say, bankWeb.
ServletDisplays 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 6: jar module details

FieldOptionsDescription
Module Name-The name of the selected jar module, say bankEJB.jar.
Entity Bean-The details for the entity beans.
-BeansThe 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.
-BeansThe 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.
-BeansThe name of the stateless session beans.
Message Driven Bean-The details for the message driven beans.
-BeansThe name of the message driven bean.
-Time taken for MDBeans onMessage method callThe time taken for MDBs onMessage method call.

Reading Entity Beans

Selecting an entity bean name displays the following details:

Table 7: Reading Entity Beans

Task nameTime 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.
lockingTimeTo obtain and release a lock by the bean.
postProcesingTimeTo complete the tasks that are done after processing the actual business methods in the bean.
storeTimeTo store data.
preProcessingTimeTo 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.
loadTimeTo load data.
activationTimeFor activation.
riLockingTimeTo lock a remote bean instance.
onPoolWaitingTimeTo wait for getting a bean from the bean pool.
ejbActivateTimeTo call the ejbActivate method.
beanGetTimeTo get a bean from the bean pool.
creatingTimeTo create a bean instance.
lockRowTimeTo lock a row.
onCacheWaitingTimeTo 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.
verifiedUpdateTimeVerify the updation of the bean.
activateLoadTimeTo activate the load.
rollbackLoadTimeTo rollback the load.
lockWaitingTimeTo obtain a lock for the bean.
passivationTimeFor 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 8: Reading Stateful Session Beans

Task nameTime 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.
preProcessingTimeTo 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.
postProcesingTimeTo complete the tasks that are done after processing the actual business methods in the bean.
onPoolWaitingTimeTo wait for getting a bean from the bean pool.
beanGetTimeTo get a bean from the bean pool.
aliveTimeFor which the bean is in existence.
creatingTimeTo create a bean instance.
ejbActivateTimeTo call the ejbActivate method.
activationTimeFor activation.
riLockingTimeTo lock a remote bean instance.
passivationTimeFor 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 9: Reading Stateless Session Beans

Task NameTime taken
transfer:long;long;double;(BusinessMethod)To execute the applications business method.
transfer:long;long;double;(ActualMethod)To execute the applications actual method.
preProcessingTimeTo complete the tasks that are done prior to processing the actual business methods in the bean.
beanGetTimeTo get a bean from the bean pool.
onPoolWaitingTimeTo wait for getting a bean from the bean pool.
create:(BusinessMethod)To execute the applications business method.
postProcesingTimeTo complete the tasks that are done after processing the actual business methods in the bean.
creatingTimeTo create a bean instance.
riLockingTimeTo lock a remote bean instance.

How do I save Diagnostic Data?

To save and store diagnostic data in the local server:

  1. Click Save.
  2. Enter a name for the report to be saved.
  3. Clicking Save displays the following message: ‘The report has been saved by name "<name _moz-userdefined="">"’. The report can be accessed later from the diagnostics home page.
    Note: Use Cancel to abort the process.
  4. Click Continue to view other diagnostic data. Click Close on the toolbar to exit Diagnostics.

How do I view Diagnostic Data?

To view diagnostic data:
  1. Locate the saved reports listed under Reports on the Server Diagnostics Reports page.
  2. Select the required report and click Download Report. The file download dialog-box opens.
  3. Select Open this file from current location to view diagnostic data. Select Save this to disk to make a local copy.

How do I delete Diagnostic Data?

To delete diagnostic data from the Server, click Trash on the toolbar. If data is saved as a report, select the reports to be removed and click Delete.

Related Topics:

© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal