性能监控2
Performance Monitoring, Part 2
Roger Sanders 著
笑熬浆糊 译
天堂鸟自由空间原创作品
天堂鸟自由空间©2002-2005版权所有
转载请保持文档的完整性
访问更多可以浏览http://hbird.vicp.net/myself.html
或http://hbird.myrice.com/myself.html
Blog: http://blog.csdn.net/mr_bean
BBS讨论: http://hbird.vicp.net
mail:[email protected]
性能监控2
Roger Sanders 著
笑熬浆糊 译
原文出处:《DB2 Magazine》 Quarter 3, 2004 Vol. 9, Issue 3
英文原文(由于文章翻译未经授权,请在转载时保留原文链接)
CREATE EVENT MONITOR [Name]
FOR [DATABASE |
BUFFERPOOLS |
TABLESPACES |
TABLES |
DEADLOCKS < WITH DETAIL > |
CONNECTIONS < WHERE [EventCondition] > |
STATEMENTS < WHERE [EventCondition] > |
TRANSACTIONS < WHERE
[EventCondition] > , ...]
WRITE TO [TABLE [GroupName] (TABLE
[TableName]) |
PIPE [PipeName] |
FILE [DirectoryName]]
[MANUALSTART | AUTOSTART]
CREATE EVENT MONITOR CONN_EVENTS
FOR CONNECTIONS
WRITE TO TABLE CONN (TABLE CONN_DATA)
CREATE EVENT MONITOR BPTS_EVENTS
FOR BUFFERPOOLS, TABLESPACES
WRITE TO FILE '/export/home/BPTS_DATA'
SET EVENT MONITOR [MonitorName] STATE < = > [MonitorState]
SET EVENT MONITOR CONN_EVENTS STATE 1
SET EVENT MONITOR CONN_EVENTS STATE 0
图1 时间分析工具
db2evmon -db [DatabaseAlias] -evm [MonitorName]
或者 db2evmon -path [MonitorTarget]
CREATE EVENT MONITOR CONN_EVENTS
FOR CONNECTIONS
WRITE TO FILE 'C:/MONDATA'
AUTOSTART
Reading C:/DBSIO/00000000.EVT ... ----------------------------------------------------------------------- EVENT LOG HEADER Event Monitor name: CONN_EVENTS Server Product ID: SQL08015 Version of event monitor data: 7 Byte order: LITTLE ENDIAN Number of nodes in db2 instance: 1 Codepage of database: 1252 Territory code of database: 1 Server instance name: DB2 ----------------------------------------------------------------------- ----------------------------------------------------------------------- Database Name: SAMPLE Database Path: C:/DB2/NODE0000/SQL00001/ First connection timestamp: 03-24-2004 16:53:00.020233 Event Monitor Start time: 03-24-2004 16:53:00.155733 ----------------------------------------------------------------------- 3) Connection Header Event ... Appl Handle: 16 Appl Id: *LOCAL.DB 2.0120C 4215303 Appl Seq number: 0001 DRDA AS Correlation Token: *LOCAL.DB 2.0120C 4215303 Program Name : db2evmon.exe Authorization Id: RSANDERS Execution Id : RSANDERS Codepage Id: 1252 Territory code: 0 Client Process Id: 1788 Client Database Alias: SAMPLE Client Product Id: SQL08015 Client Platform: Unknown Client Communication Protocol: Local Client Network Name: Connect timestamp: 03-24-2004 16:53:00.020233 4) Connection Event Appl Handle: 16 Appl Id: *LOCAL.DB 2.0120C 4215303 Appl Seq number: 0003
Record is the result of a flush: FALSE Application Status: SQLM_UOWWAIT Lock Statistics: Lock Waits: 0 Total time waited on locks (milliseconds): 0 Deadlocks: 0 Lock escalations: 0 X lock escalations: 0 Lock timeouts: 0 Sort Statistics: Sorts: 0 Total sort time (milliseconds): 0 Sort overflows: 0 Hash Statistics: Hash Joins: 0 Hash Loops: 0 Hash Join Small Overflows: 0 Hash Join Overflows: 0
Buffer Pool Statistics: Buffer pool logical data page reads: 12 Buffer pool physical data page reads: 4 Buffer pool data page writes: 0 Buffer pool logical index page reads: 30 Buffer pool physical index page reads: 18 Buffer pool index page writes: 0 Buffer pool read time (microseconds): 0 Buffer pool write time (microseconds): 0 Time spent waiting for a prefetch: 0 milliseconds Unread prefetch pages: 0
Workspace Statistics: Shared workspace high water mark: 0 Total shared workspace overflows: 0 Total shared workspace section lookups: 0 Total shared workspace section inserts: 0 Private workspace high water mark: 13746 Total private workspace overflows: 0 Total private workspace section lookups: 2 Total private workspace section inserts: 2
Direct I/O Statistics: Sectors read directly: 14 Sectors written directly: 0 Direct read requests: 5 Direct write requests: 0 Direct read time: 0 Direct write time: 0
SQL Statement counts Commit SQL statements: 1 Rollback SQL statements: 0 Dynamic SQL statements: 1 Static SQL stmts: 3 Failed SQL statements: 0 Select SQL statements: 2 Data Definition Language SQL statements: 0 Update/Insert/Delete SQL statements: 0
Internal counts Internal auto rebinds: 0 Internal rows deleted: 0 Internal rows updated: 0 Internal rows inserted: 0 Internal commits: 0 Internal rollbacks: 0 Internal rollbacks due to deadlock: 0
Row counts Rows deleted: 0 Rows inserted: 0 Rows updated: 0 Rows selected: 2 Rows read: 6 Rows written: 0 Binds/Precompiles: 0 Rejected block cursor requests: 0 Accepted block cursor requests: 0
Package Cache Statistics Package Cache Lookups: 3 Package Cache Inserts: 2 Section Lookups: 3 Section Inserts: 2
Catalog Cache Statistics Catalog Cache Overflows: 0 Catalog Cache High Water Mark: 0 Catalog Cache Lookups: 2 Catalog Cache Inserts: 0
CPU times User CPU time: 0.000000 seconds System CPU time: 0.000000 seconds
Memory usage:
Memory Pool Type: Other Memory Current size (bytes): 16384 High water mark (bytes): 98304 Maximum size allowed (bytes): 1071644672
Memory Pool Type: Application Heap Current size (bytes): 212992 High water mark (bytes): 212992 Maximum size allowed (bytes): 1277952
Memory Pool Type: Application Control Heap Current size (bytes): 16384 High water mark (bytes): 16384 Maximum size allowed (bytes): 704512
Disconnection Time: 03-24-2004 16:53:00.191692 |
完整版本(包含图片的PDF文件)请到http://hbird.vicp.net/viewthread.php?tid=1486处下载