GET SNAPSHOT コマンド
GET SNAPSHOT コマンドは、状況情報を収集し、出力の形式を設定します。 返される情報は、コマンドを発行した時点の データベース・マネージャー の操作状況の スナップショット です。
範囲
このコマンドは、現在アタッチされているメンバーに対して実行され、デフォルトではそのメンバーについての情報のみを返します。 ホストごとに複数のメンバーがある場合、現在接続されているメンバーは、そのホスト上の db2nodes.cfg ファイルにリストされている最初のメンバーです。
現在アタッチされているメンバーではない特定のメンバーに対してコマンドを発行するには、ATTACH_MEMBERパラメーターを指定します。 すべてのメンバーに対してこのコマンドを発行し、集約された結果を受け取るには、GLOBALパラメーターを指定します。
現在アタッチされているメンバーを変更するには、 ATTACH_MEMBER パラメーターを指定して SET CLIENT コマンドを発行します。 この変更を適用するには、アプリケーションから DETACH コマンドを実行し、続けて ATTACH コマンドを実行する必要があります。
許可
- SYSADM
- SYSCTRL
- SYSMAINT
- SYSMON
必要な接続
インスタンス。 インスタンス接続が存在しない場合は、デフォルトのインスタンス接続が作成されます。
リモート・インスタンスのスナップショットを獲得するには、 まず最初にそのインスタンスにアタッチすることが必要です。
コマンド構文
統計を収集するために、モニター・スイッチをオンにする必要があります。
コマンド・パラメーター
- DATABASE MANAGER
- アクティブな データベース・マネージャー ・インスタンスの統計を提供します。
- ALL DATABASES
- 現行メンバー上のアクティブ・データベースすべてに関する一般統計を提供します。
- ALL APPLICATIONS
- 現行メンバー上のデータベースに接続されたアクティブ・アプリケーションすべてに関する情報を提供します。
- ALL BUFFERPOOLS
- アクティブ・データベースすべてのバッファー・プール・アクティビティーに関する情報を提供します。
- APPLICATION APPLID appl-id
- 指定された ID を持つアプリケーションの情報だけを提供します。 特定のアプリケーション ID を取得するには、LIST APPLICATIONS コマンドを使用してください。
- APPLICATION AGENTID appl-handle
- 指定されたアプリケーション・ハンドルを持つアプリケーションの情報だけを提供します。 アプリケーション・ハンドルは 32 ビットの数字で、 現在実行中のアプリケーションを固有に識別できるものです。 特定のアプリケーション・ハンドルを取得するには、LIST APPLICATIONS コマンドを使用してください。
- FCM FOR ALL MEMBERS
- GET SNAPSHOT コマンドの発行対象のメンバーと、パーティション・データベース環境または Db2® pureScale® 環境の他のメンバーとの間の Fast Communication Manager (FCM) 統計を提供します。
- LOCKS FOR APPLICATION APPLID appl-id
- アプリケーション ID によって識別される、 指定したアプリケーションによって保留されているロックすべてに関する情報を提供します。
- LOCKS FOR APPLICATION AGENTID appl-handle
- アプリケーション・ハンドルによって識別される、 指定したアプリケーションによって保留されているロックすべてに関する情報を提供します。
- ALL REMOTE_DATABASES
- 現行メンバー上のアクティブ・リモート・データベースすべてに関する一般統計を提供します。
- ALL REMOTE_APPLICATIONS
- 現行メンバーに接続されたアクティブ・リモート・アプリケーションすべてに関する情報を提供します。
- ALL ON database-alias
- 指定したデータベースのアプリケーション、表、表スペース、 バッファー・プール、およびロックすべてに関する一般統計および情報を提供します。
- DATABASE ON database-alias
- 特定のデータベースの一般統計を提供します。
- APPLICATIONS ON database-alias
- 特定のデータベースに接続されたアプリケーションすべてに関する情報を提供します。
- TABLES ON database-alias
- 特定のデータベース内の表に関する情報を提供します。 これには、TABLE 記録スイッチがオンになった後にアクセスのあった表だけが含まれます。
- TABLESPACES ON database-alias
- 特定のデータベースの表スペースに関する情報を提供します。
- LOCKS ON database-alias
- 特定のデータベースに接続された各アプリケーションが保留するロックすべてに関する情報を提供します。
- BUFFERPOOLS ON database-alias
- 指定したデータベースのバッファー・プール活動に関する情報を提供します。
- REMOTE_DATABASES ON database-alias
- 指定されたデータベースのアクティブ・リモート・データベースすべてに関する一般統計を提供します。
- REMOTE_APPLICATIONS ON database-alias
- 指定されたデータベースのリモート・アプリケーションに関する情報を提供します。
- DYNAMIC SQL ON database-alias
- データベースに対して SQL ステートメント・キャッシュの内容のスナップショットを戻します。
- DCS
- 指定された節に従って、このキーワードは以下のものに関する統計を要求します。
- Db2 Connect ゲートウェイで現在実行されている特定の DCS アプリケーション
- すべての DCS アプリケーション
- 特定の DCS データベースに現在接続されているすべての DCS アプリケーション
- 特定の DCS データベース
- すべての DCS データベース
- AT MEMBER member-number
- 指定されたメンバーの結果を戻します。
- GLOBAL
- すべてのメンバーのスナップショット結果を戻します。
例
- データベース・マネージャーに関するスナップショット情報を要求するには、次のコマンドを発行します。
以下は、上記のコマンドからリストされたサンプル出力です。get snapshot for database manager
Database Manager Snapshot Node name = Node type = Enterprise Server Edition with local and remote clients Instance name = DB2 Number of members in Db2 instance = 1 Database manager status = Active Product name = Db2 v9.5.0.535 Service level = s070101 (NT32) Private Sort heap allocated = 0 Private Sort heap high water mark = 0 Post threshold sorts = Not Collected Piped sorts requested = 0 Piped sorts accepted = 0 Start Database Manager timestamp = 01/10/2007 15:18:36.241035 Last reset timestamp = Snapshot timestamp = 01/10/2007 15:28:26.989789 Remote connections to db manager = 3 Remote connections executing in db manager = 0 Local connections = 1 Local connections executing in db manager = 0 Active local databases = 1 High water mark for agents registered = 0 Agents registered = 8 Idle agents = 0 Committed private Memory (Bytes) = 8912896 Switch list for member number 0 Buffer Pool Activity Information (BUFFERPOOL) = OFF Lock Information (LOCK) = ON 01/10/2007 15:22:43.145437 Sorting Information (SORT) = OFF SQL Statement Information (STATEMENT) = OFF Table Activity Information (TABLE) = OFF Take Timestamp Information (TIMESTAMP) = ON 01/10/2007 15:18:36.241035 Unit of Work Information (UOW) = OFF Agents assigned from pool = 3 Agents created from empty pool = 11 Agents stolen from another application = 0 High water mark for coordinating agents = 9 Hash joins after heap threshold exceeded = 0 OLAP functions after heap threshold exceeded = 0 Total number of gateway connections = 0 Current number of gateway connections = 0 Gateway connections waiting for host reply = 0 Gateway connections waiting for client request = 0 Gateway connection pool agents stolen = 0 Node FCM information corresponds to = 1 Free FCM buffers = 13425 Total FCM buffers = 13425 Free FCM buffers low water mark = 13420 Maximum number of FCM buffers = 28640 Free FCM channels = 8036 Total FCM channels = 8055 Free FCM channels low water mark = 8036 Maximum number of FCM channels = 28640 Number of FCM nodes = 3 Node Total Buffers Total Buffers Connection Number Sent Received Status ----------- ------------------ ------------------ ----------------- 1 1 1 Active 2 1 0 Active 10 1 0 Active Node FCM information corresponds to = 2 Free FCM buffers = 13425 Total FCM buffers = 13425 Free FCM buffers low water mark = 13420 Maximum number of FCM buffers = 28640 Free FCM channels = 8036 Total FCM channels = 8055 Free FCM channels low water mark = 8036 Maximum number of FCM channels = 28640 Number of FCM nodes = 3 Node Total Buffers Total Buffers Connection Number Sent Received Status ----------- ------------------ ------------------ ----------------- 1 0 1 Active 2 1 1 Active 10 0 0 Active Node FCM information corresponds to = 10 Free FCM buffers = 13425 Total FCM buffers = 13425 Free FCM buffers low water mark = 13420 Maximum number of FCM buffers = 28640 Free FCM channels = 8036 Total FCM channels = 8055 Free FCM channels low water mark = 8036 Maximum number of FCM channels = 28640 Number of FCM nodes = 3 Node Total Buffers Total Buffers Connection Number Sent Received Status ----------- ------------------ ------------------ ----------------- 1 0 1 Active 2 0 0 Active 10 1 1 Active Memory usage for database manager: Node number = 0 Memory Pool Type = Other Memory Current size (bytes) = 11534336 High water mark (bytes) = 11599872 Configured size (bytes) = 34275328 Node number = 0 Memory Pool Type = Database Monitor Heap Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 327680 Node number = 0 Memory Pool Type = FCMBP Heap Current size (bytes) = 655360 High water mark (bytes) = 655360 Configured size (bytes) = 851968
- エージェント ID 29 のアプリケーションに関するスナップショット情報を要求するには次のようにします。
以下は、ロックとステートメント・モニターのスイッチが次のget snapshot for application agentid 29
ON
とおりであると仮定した場合、前のコマンドからの出力リストの例です。Application Snapshot Application handle = 29 Application status = Lock-wait Status change time = Not Collected Application code page = 819 Application country/region code = 1 DUOW correlation token = *LOCAL.jwr.070222182152 Application name = db2bp Application ID = *LOCAL.jwr.070222182152 Sequence number = 00001 TP Monitor client user ID = TP Monitor client workstation name = TP Monitor client application name = TP Monitor client accounting string = Connection request start timestamp = 02/22/2007 13:21:52.587168 Connect request completion timestamp = 02/22/2007 13:21:53.291779 Application idle time = CONNECT Authorization ID = JWR Client login ID = jwr Configuration NNAME of client = gilera Client database manager product ID = SQL09050 Process ID of client application = 843852 Platform of client application = AIX 64BIT Communication protocol of client = Local Client Inbound communication address = *LOCAL.jwr Database name = SAMPLE Database path = /home/jwr/jwr/NODE0000/SQL00001/ Client database alias = SAMPLE Input database alias = Last reset timestamp = Snapshot timestamp = 02/22/2007 13:22:39.766300 Authorization level granted = User authority: DBADM authority CREATETAB authority BINDADD authority CONNECT authority CREATE_NOT_FENC authority LOAD authority IMPLICIT_SCHEMA authority CREATE_EXT_RT authority QUIESCE_CONN authority Group authority: SYSADM authority CREATETAB authority BINDADD authority CONNECT authority IMPLICIT_SCHEMA authority Coordinator member number = 0 Current member number = 0 Coordinator agent process or thread ID = 1801 Current Workload ID = 1 Agents stolen = 0 Agents waiting on locks = 1 Maximum associated agents = 1 Priority at which application agents work = 0 Priority type = Dynamic Lock timeout (seconds) = -1 Locks held by application = 4 Lock waits since connect = 1 Time application waited on locks (ms) = 20268 Deadlocks detected = 0 Lock escalations = 0 Exclusive lock escalations = 0 Number of Lock Timeouts since connected = 0 Total time UOW waited on locks (ms) = Not Collected Total sorts = 0 Total sort time (ms) = Not Collected Total sort overflows = 0 Buffer pool data logical reads = Not Collected Buffer pool data physical reads = Not Collected Buffer pool temporary data logical reads = Not Collected Buffer pool temporary data physical reads = Not Collected Buffer pool data writes = Not Collected Buffer pool index logical reads = Not Collected Buffer pool index physical reads = Not Collected Buffer pool temporary index logical reads = Not Collected Buffer pool temporary index physical reads = Not Collected Buffer pool index writes = Not Collected Buffer pool xda logical reads = Not Collected Buffer pool xda physical reads = Not Collected Buffer pool temporary xda logical reads = Not Collected Buffer pool temporary xda physical reads = Not Collected Buffer pool xda writes = Not Collected Total buffer pool read time (milliseconds) = Not Collected Total buffer pool write time (milliseconds) = Not Collected Time waited for prefetch (ms) = Not Collected Unread prefetch pages = Not Collected Direct reads = Not Collected Direct writes = Not Collected Direct read requests = Not Collected Direct write requests = Not Collected Direct reads elapsed time (ms) = Not Collected Direct write elapsed time (ms) = Not Collected Number of SQL requests since last commit = 3 Commit statements = 0 Rollback statements = 0 Dynamic SQL statements attempted = 3 Static SQL statements attempted = 0 Failed statement operations = 0 Select SQL statements executed = 1 Xquery statements executed = 0 Update/Insert/Delete statements executed = 0 DDL statements executed = 0 Inactive stmt history memory usage (bytes) = 0 Internal automatic rebinds = 0 Internal rows deleted = 0 Internal rows inserted = 0 Internal rows updated = 0 Internal commits = 1 Internal rollbacks = 0 Internal rollbacks due to deadlock = 0 Binds/precompiles attempted = 0 Rows deleted = 0 Rows inserted = 0 Rows updated = 0 Rows selected = 0 Rows read = 95 Rows written = 0 UOW log space used (Bytes) = Not Collected Previous UOW completion timestamp = Not Collected Elapsed time of last completed uow (sec.ms) = Not Collected UOW start timestamp = Not Collected UOW stop timestamp = Not Collected UOW completion status = Not Collected Open remote cursors = 0 Open remote cursors with blocking = 0 Rejected Block Remote Cursor requests = 0 Accepted Block Remote Cursor requests = 1 Open local cursors = 1 Open local cursors with blocking = 1 Total User CPU Time used by agent (s) = 0.019150 Total System CPU Time used by agent (s) = 0.001795 Host execution elapsed time = 0.012850 Package cache lookups = 2 Package cache inserts = 1 Application section lookups = 3 Application section inserts = 1 Catalog cache lookups = 11 Catalog cache inserts = 8 Catalog cache overflows = 0 Catalog cache high water mark = 0 Workspace Information Shared high water mark = 0 Total shared overflows = 0 Total shared section inserts = 0 Total shared section lookups = 0 Private high water mark = 0 Total private overflows = 0 Total private section inserts = 0 Total private section lookups = 0 Most recent operation = Fetch Cursor name = SQLCUR201 Most recent operation start timestamp = 02/22/2007 13:22:19.497439 Most recent operation stop timestamp = Agents associated with the application = 1 Number of hash joins = 0 Number of hash loops = 0 Number of hash join overflows = 0 Number of small hash join overflows = 0 Number of OLAP functions = 0 Number of OLAP function overflows = 0 Statement type = Dynamic SQL Statement Statement = Fetch Section number = 201 Application creator = NULLID Package name = SQLC2G11 Consistency Token = AAAAANBX Package Version ID = Cursor name = SQLCUR201 Statement member number = 0 Statement start timestamp = 02/22/2007 13:22:19.497439 Statement stop timestamp = Elapsed time of last completed stmt(sec.ms) = 0.000289 Total Statement user CPU time = 0.002172 Total Statement system CPU time = 0.001348 SQL compiler cost estimate in timerons = 14 SQL compiler cardinality estimate = 57 Degree of parallelism requested = 1 Number of agents working on statement = 1 Number of subagents created for statement = 1 Statement sorts = 0 Total sort time = 0 Sort overflows = 0 Rows read = 0 Rows written = 0 Rows deleted = 0 Rows updated = 0 Rows inserted = 0 Rows fetched = 0 Buffer pool data logical reads = Not Collected Buffer pool data physical reads = Not Collected Buffer pool temporary data logical reads = Not Collected Buffer pool temporary data physical reads = Not Collected Buffer pool index logical reads = Not Collected Buffer pool index logical reads = Not Collected Buffer pool temporary index logical reads = Not Collected Buffer pool temporary index physical reads = Not Collected Buffer pool xda logical reads = Not Collected Buffer pool xda physical reads = Not Collected Buffer pool temporary xda logical reads = Not Collected Buffer pool temporary xda physical reads = Not Collected Blocking cursor = YES Dynamic SQL statement text: select * from org Agent process/thread ID = 1801 Memory usage for application: Memory Pool Type = Application Heap Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 1048576 Agent process/thread ID = 1801 Agent Lock timeout (seconds) = -1 Memory usage for agent: Memory Pool Type = Other Memory Current size (bytes) = 589824 High water mark (bytes) = 786432 Configured size (bytes) = 34359738368 ID of agent holding lock = 34 Application ID holding lock = *LOCAL.jwr.070222182158 Lock name = 0x0002000E000000000000000054 Lock attributes = 0x00000000 Release flags = 0x00000001 Lock object type = Table Lock mode = Exclusive Lock (X) Lock mode requested = Intention Share Lock (IS) Name of tablespace holding lock = USERSPACE1 Schema of table holding lock = JWR Name of table holding lock = ORG Data Partition Id of table holding lock = 0 Lock wait start timestamp = 02/22/2007 13:22:19.497833
- すべてのデータベースに関するスナップショット情報を要求するには、以下のコマンドを発行します。
get snapshot for all databases
以下は、上記のコマンドからリストされたサンプル出力です。Database Snapshot Database name = SAMPLE Database path = C:\DB2\NODE0000\SQL00001\ Input database alias = Database status = Active Catalog database partition number = 0 Catalog network node name = Operating system running at database server= NT Location of the database = Local First database connect timestamp = 06/21/2007 14:46:49.771064 Last reset timestamp = Last backup timestamp = Snapshot timestamp = 06/21/2007 14:51:50.235993 Number of automatic storage paths = 1 Automatic storage path = C: Node number = 0 High water mark for connections = 6 Application connects = 4 Secondary connects total = 4 Applications connected currently = 1 Appls. executing in db manager currently = 0 Agents associated with applications = 5 Maximum agents associated with applications= 6 Maximum coordinating agents = 6 Number of Threshold Violations = 0 Locks held currently = 0 Lock waits = 0 Time database waited on locks (ms) = Not Collected Lock list memory in use (Bytes) = 2256 Deadlocks detected = 0 Lock escalations = 0 Exclusive lock escalations = 0 Agents currently waiting on locks = 0 Lock Timeouts = 0 Number of indoubt transactions = 0 Total Private Sort heap allocated = 0 Total Shared Sort heap allocated = 0 Shared Sort heap high water mark = 0 Post threshold sorts (shared memory) = Not Collected Total sorts = 0 Total sort time (ms) = Not Collected Sort overflows = 0 Active sorts = 0 Buffer pool data logical reads = Not Collected Buffer pool data physical reads = Not Collected Buffer pool temporary data logical reads = Not Collected Buffer pool temporary data physical reads = Not Collected Asynchronous pool data page reads = Not Collected Buffer pool data writes = Not Collected Asynchronous pool data page writes = Not Collected Buffer pool index logical reads = Not Collected Buffer pool index physical reads = Not Collected Buffer pool temporary index logical reads = Not Collected Buffer pool temporary index physical reads = Not Collected Asynchronous pool index page reads = Not Collected Buffer pool index writes = Not Collected Asynchronous pool index page writes = Not Collected Buffer pool xda logical reads = Not Collected Buffer pool xda physical reads = Not Collected Buffer pool temporary xda logical reads = Not Collected Buffer pool temporary xda physical reads = Not Collected Buffer pool xda writes = Not Collected Asynchronous pool xda page reads = Not Collected Asynchronous pool xda page writes = Not Collected Total buffer pool read time (milliseconds) = Not Collected Total buffer pool write time (milliseconds)= Not Collected Total elapsed asynchronous read time = Not Collected Total elapsed asynchronous write time = Not Collected Asynchronous data read requests = Not Collected Asynchronous index read requests = Not Collected Asynchronous xda read requests = Not Collected No victim buffers available = Not Collected LSN Gap cleaner triggers = Not Collected Dirty page steal cleaner triggers = Not Collected Dirty page threshold cleaner triggers = Not Collected Time waited for prefetch (ms) = Not Collected Unread prefetch pages = Not Collected Direct reads = Not Collected Direct writes = Not Collected Direct read requests = Not Collected Direct write requests = Not Collected Direct reads elapsed time (ms) = Not Collected Direct write elapsed time (ms) = Not Collected Database files closed = Not Collected Vectored IOs = Not Collected Pages from vectored IOs = Not Collected Block IOs = Not Collected Pages from block IOs = Not Collected Host execution elapsed time = Not Collected Commit statements attempted = 0 Rollback statements attempted = 0 Dynamic statements attempted = 6 Static statements attempted = 3 Failed statement operations = 0 Select SQL statements executed = 0 Xquery statements executed = 0 Update/Insert/Delete statements executed = 0 DDL statements executed = 0 Inactive stmt history memory usage (bytes) = 0 Internal automatic rebinds = 0 Internal rows deleted = 0 Internal rows inserted = 0 Internal rows updated = 0 Internal commits = 6 Internal rollbacks = 0 Internal rollbacks due to deadlock = 0 Number of MDC table blocks pending cleanup = 0 Rows deleted = 0 Rows inserted = 0 Rows updated = 0 Rows selected = 0 Rows read = 98 Binds/precompiles attempted = 0 Log space available to the database (Bytes)= 20400000 Log space used by the database (Bytes) = 0 Maximum secondary log space used (Bytes) = 0 Maximum total log space used (Bytes) = 0 Secondary logs allocated currently = 0 Log pages read = 0 Log read time (sec.ns) = 0.000000004 Log pages written = 0 Log write time (sec.ns) = 0.000000004 Number write log IOs = 0 Number read log IOs = 0 Number partial page log IOs = 0 Number log buffer full = 0 Log data found in buffer = 0 Appl id holding the oldest transaction = 93 Log to be redone for recovery (Bytes) = 0 Log accounted for by dirty pages (Bytes) = 0 Node number = 0 File number of first active log = 0 File number of last active log = 2 File number of current active log = 0 File number of log being archived = Not applicable Package cache lookups = 6 Package cache inserts = 0 Package cache overflows = 0 Package cache high water mark (Bytes) = 196608 Application section lookups = 6 Application section inserts = 0 Catalog cache lookups = 37 Catalog cache inserts = 10 Catalog cache overflows = 0 Catalog cache high water mark = 65536 Catalog cache statistics size = 0 Workspace Information Shared high water mark = 0 Corresponding shared overflows = 0 Total shared section inserts = 0 Total shared section lookups = 0 Private high water mark = 0 Corresponding private overflows = 0 Total private section inserts = 0 Total private section lookups = 0 Number of hash joins = 0 Number of hash loops = 0 Number of hash join overflows = 0 Number of small hash join overflows = 0 Post threshold hash joins (shared memory) = 0 Active hash joins = 0 Number of OLAP functions = 0 Number of OLAP function overflows = 0 Active OLAP functions = 0 Statistic fabrications = Not Collected Synchronous runstats = Not Collected Asynchronous runstats = Not Collected Total statistic fabrication time (milliseconds) = Not Collected Total synchronous runstats time (milliseconds) = Not Collected Memory usage for database: Node number = 0 Memory Pool Type = Backup/Restore/Util Heap Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 20512768 Node number = 0 Memory Pool Type = Package Cache Heap Current size (bytes) = 196608 High water mark (bytes) = 196608 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Other Memory Current size (bytes) = 131072 High water mark (bytes) = 131072 Configured size (bytes) = 20971520 Node number = 0 Memory Pool Type = Catalog Cache Heap Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Buffer Pool Heap Secondary ID = 1 Current size (bytes) = 2424832 High water mark (bytes) = 2424832 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Buffer Pool Heap Secondary ID = System 32k buffer pool Current size (bytes) = 851968 High water mark (bytes) = 851968 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Buffer Pool Heap Secondary ID = System 16k buffer pool Current size (bytes) = 589824 High water mark (bytes) = 589824 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Buffer Pool Heap Secondary ID = System 8k buffer pool Current size (bytes) = 458752 High water mark (bytes) = 458752 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Buffer Pool Heap Secondary ID = System 4k buffer pool Current size (bytes) = 393216 High water mark (bytes) = 393216 Configured size (bytes) = 402653184 Node number = 0 Memory Pool Type = Shared Sort Heap Current size (bytes) = 0 High water mark (bytes) = 0 Configured size (bytes) = 20512768 Node number = 0 Memory Pool Type = Lock Manager Heap Current size (bytes) = 327680 High water mark (bytes) = 327680 Configured size (bytes) = 393216 Node number = 0 Memory Pool Type = Database Heap Current size (bytes) = 10551296 High water mark (bytes) = 10551296 Configured size (bytes) = 12582912 Node number = 0 Memory Pool Type = Application Heap Secondary ID = 97 Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 1048576 Node number = 0 Memory Pool Type = Application Heap Secondary ID = 96 Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 1048576 Node number = 0 Memory Pool Type = Application Heap Secondary ID = 95 Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 1048576 Node number = 0 Memory Pool Type = Application Heap Secondary ID = 94 Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 1048576 Node number = 0 Memory Pool Type = Application Heap Secondary ID = 93 Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 1048576 Node number = 0 Memory Pool Type = Applications Shared Heap Current size (bytes) = 65536 High water mark (bytes) = 65536 Configured size (bytes) = 20512768
ユーザー権限は、そのユーザーに付与されているすべての権限およびロールを表しており、グループ権限は、そのグループに付与されているすべての権限とロールを表しています。
- SAMPLEデータベースに接続されたアプリケーション・ハンドル
765
を持つ特定のアプリケーションのスナップショット情報を請求するには、次のコマンドを発行してください。get snapshot for application agentid 765
- SAMPLE データベースに関する動的 SQL スナップショット情報を要求するには、次のコマンドを発行します。
get snapshot for dynamic sql on sample
- 高速コミュニケーション・マネージャー (FCM) 統計を要求するには、次のコマンドを発行します。
get snapshot for fcm for all dbpartitionnums
以下は、上記のコマンドからリストされたサンプル出力です。FCM Snapshot Node FCM information corresponds to = 1 Free FCM buffers = 10740 Total FCM buffers = 10740 Free FCM buffers low water mark = 10740 Maximum number of FCM buffers = 28640 Free FCM channels = 6265 Total FCM channels = 6265 Free FCM channels low water mark = 6265 Maximum number of FCM channels = 28640 Snapshot timestamp = 02/17/2010 15:54:57.094901 Number of FCM nodes = 3 Node Total Buffers Total Buffers Connection Number Sent Received Status ----------- ------------------ ------------------ ----------------- 1 2 2 Active 2 1 1 Active 10 1 1 Active
使用上の注意
- GET SNAPSHOT コマンドは、num_gw_conn_switches モニター・エレメントを「ゲートウェイ接続プール・エージェント・スチール」として表示します。
- データベースに対して書き込みサスペンドが ON になっている場合、書き込みサスペンドが OFF になるまで、そのデータベースに対してスナップショットを発行することはできません。 書き込みサスペンドが ON になっているデータベースに対してスナップショットを発行すると、診断プローブが db2diag ログ・ファイルに書き込まれ、そのデータベースはスキップされます。
- リモート・インスタンス (または別のローカル・インスタンス) からスナップショットを獲得するには、 まず最初にそのインスタンスとアタッチすることが必要です。 別のインスタンスに存在するデータベースの別名が指定されている場合には、 エラー・メッセージが戻されます。
- 統計を取得するには、データベース・システム・モニター・スイッチが ON であることが必要です。 記録スイッチ TIMESTAMP が OFF に設定されている場合、タイム・スタンプに関連したエレメントは "Not Collected" を報告します。
- 以下の条件のいずれかが真の場合には、表情報を要求してもデータは返ってきません。
- TABLE 記録スイッチがオフである。
- スイッチをオンにして以来、アクセスのあった表がない。
- 最後に RESET MONITOR コマンドを発行して以来、アクセスのあった表がない。
しかし、REORG TABLE が実行中であるか、またはこの期間中に実行された場合、 一部の情報は戻されますが一部のフィールドは表示されません。 パーティション表の場合は、再編成された各データ・パーティションに関する情報が戻されます。
- すべてのメンバーからのスナップショット情報 (すべてのメンバーに関する集約結果とは違う) を取得するには、スナップショット管理ビューを使用する必要があります。
- パーティション・データベース環境または Db2 pureScale 環境では、 GLOBAL オプションを使用してコマンドを指定すると、すべてのメンバーの個々の最高水準点の合計ではなく、すべてのメンバー間の接続の最高水準点を表す
High water mark for connections
パラメーターの値が返されます。 以下に例を示します。- メンバー 1 には、現在 5 つのアプリケーションが接続されていて、接続の最高水準点は 5 です。
- メンバー 2 には、現在 4 つのアプリケーションが接続されていて、接続の最高水準点は 6 です。
前例では、
High water mark for connections
値は6、Applications connected currently
値は9です。 - ストレージ・グループを使用している場合、スナップショット・モニターはデフォルトのストレージ・グループのみの情報を報告します。 すべてのデータベース・ストレージ・グループのストレージ・パスに関する情報を表示するには、ADMIN_GET_STORAGE_PATHS 表関数を使用してください。
互換性
- DB2_ENFORCE_MEMBER_SYNTAX レジストリー変数が ON に設定されている場合を除き、DBPARTITIONNUM または NODE を MEMBERの代わりに使用できます。
- DB2_ENFORCE_MEMBER_SYNTAX レジストリー変数が ON に設定されている場合を除き、DBPARTITIONNUMS または NODES を MEMBERSの代わりに使用できます。
バージョン 9.5の新しいレジストリー変数 DB2_SYSTEM_MONITOR_SETTINGS は、 Linux®での CPU 使用量のモニターの動作に影響を与えます。 Linuxでシステムとユーザーの両方の CPU 使用時間を返す CPU 使用量の読み取り方式を使用する必要がある場合は、以下のいずれかのアクションを実行します。
Linux on RHEL4 および SLES9:
Linux on RHEL5 および SLES10:db2set DB2_SYSTEM_MONITOR_SETTINGS=DISABLE_CPU_USAGE:FALSE
db2set DB2_SYSTEM_MONITOR_SETTINGS=OLD_CPU_USAGE:TRUE