Administration guide > Monitor the environment
Monitor eXtreme Scale information in DB2
When the JPALoader or JPAEntityLoader is used with DB2 as the back-end database, eXtreme Scale-specific information can be passed to DB2. You can view this information by a performance monitor tool such as DB2 Performance Expert to monitor the eXtreme Scale applications that are accessing the database.
Before you begin
You can set trace strings with many different methods. See Logs and trace for more information about the different methods that you can use.
When the loader is configured to use DB2 as the back-end database, the following eXtreme Scale information can be passed to DB2 for monitoring purposes:
- User: Specifies the name of the user that authenticates to eXtreme Scale. When basic authentication is not used, the principals from the authentication are used.
- Workstation Name: Specifies the host name, IP of the eXtreme Scale container server.
- Application Name: Specifies the name of the ObjectGrid, Persistence Unit name (if set).
- Accounting Information: Specifies the thread ID, transaction type, transaction id, and the connection string.
Read about the DB2 Performance Expert to learn how to monitor database access.
Procedure
- To enable all eXtreme Scale client information, set the following trace strings:
ObjectGridClientInfo*=event=enabled
- To enable all but user information, use one of the following settings:
ObjectGridClientInfo*=event=enabled,ObjectGridClientInfoUser=event=disabled
or
ObjectGridClientInfo=event=enabled
Results
After you turn on the trace function, data displays in the performance monitor tool such as DB2 Performance Expert.
Example
In the following example, user bob is authenticated as an eXtreme Scale user. The application is accessing the mygrid data grid using the DB2Hibernate persistence unit. The container server is named XS_Server1. The resulting information follows:
- User=bob
- Workstation Name=XS_Server1,192.168.1.101
- Application Name=mygrid,DB2Hibernate
- Accounting Information=1, DEFAULT,FE7954BD-0126-4000-E000-2298094151DB,com.ibm.db2.jcc.t4.b@71787178
In the following example, user bob is authenticated using a WebSphere Application Server token. The application is accessing the mygrid data grid using the DB2OpenJPA persistence unit name. The container server is named XS_Server2. The resulting information follows:
- User
=acme.principal.UserPrincipal[Bob],acme.principal. GroupPrincipal[admin]
- Workstation Name=XS_Server2,192.168.1.102
- Application Name=mygrid,DB2OpenJPA
- Accounting Information=188,DEFAULT,FE72BC63-0126-4000-E000-851C092A4E33,com.ibm.ws.rsadapter.jdbc.WSJccSQLJConnection@2b432b43
Parent topic:
Monitor the deployment environment
Related concepts
Plug-ins for communicating with persistent stores
Related tasks
Monitor with the statistics API
Monitor with the xsAdmin sample utility
Monitor with managed beans (MBeans)
Troubleshoot Java Persistence API (JPA) applications