DB2 10.5 for Linux, UNIX, and Windows

db2mtrk - Memory tracker command

Provides complete report of memory status, for instances, databases, agents, and applications.

This command outputs the following memory pool allocation information:
  • Currentsize
  • Maximum size (hard limit)
  • Largest size (high water mark)
  • Type (identifier indicating function for which memory will be used)
  • Agent who allocated pool (only if the pool is private)
  • Application

The same information is also available from the Snapshot monitor.

Scope

In a partitioned database environment, this command can be invoked from any database partition defined in the db2nodes.cfg file. Apart from when instance level information is returned, the command returns information only for that database partition. This command does not return information for remote servers.

Authorization

One of the following authorities:

Required Connection

Instance. The application creates a default instance attachment if one is not present.

Command Syntax

Read syntax diagramSkip visual syntax diagram
>>-db2mtrk--+-----+--+-----+--+-----+--+-----+--+-----+--------->
            '- -i-'  '- -d-'  '- -p-'  +- -m-+  '- -a-'   
                                       '- -w-'            

>--+--------------------------+--+-----+--+-----+--------------><
   '- -r--interval--+-------+-'  '- -v-'  '- -h-'   
                    '-count-'                       

Command Parameters

-i
Show instance level memory.
-d
Show database level memory.
-a
Show application memory usage.
-p
Deprecated. Show private memory.

Replaced with -a parameter to show application memory usage.

-m
Show maximum values for each pool.
-w
Show high watermark values for each pool.
-r
Repeat mode
interval
Number of seconds to wait between subsequent calls to the memory tracker (in repeat mode).
count
Number of times to repeat.
-v
Verbose output.
-h
Show help screen. If you specify -h, only the help screen appears. No other information is displayed.

Examples

The following call returns database and instance normal values and repeats every 10 seconds:
    db2mtrk -i -d -v -r 10

Consider the following output samples:

The command db2mtrk -i -d displays the following output:
Tracking Memory on: 2006/01/17 at 15:24:38

Memory for instance

   monh    other
   576.0K  8.0M

Memory for database: AJSTORM

   utilh     pckcacheh  catcacheh  bph (1)  bph (S32K)  bph (S16K)  bph (S8K)
   64.0K     640.0K     128.0K     34.2M    576.0K      320.0K      192.0K

   bph (S4K) shsorth    lockh      dbh      apph (13)   appshrh
   128.0K    64.0K      9.6M       4.8M     64.0K       256.0K

Memory for database: CMGARCIA

   utilh     pckcacheh  catcacheh  bph (1)  bph (S32K)  bph (S16K)  bph (S8K)
   64.0K     640.0K     128.0K     34.2M    576.0K      320.0K      192.0K

   bph (S4K) shsorth    lockh      dbh      apph (26)   appshrh
   128.0K    64.0K      9.6M       4.8M     64.0K       256.0K
The command db2mtrk -a -i -d displays the following output:
Tracking Memory on: 2007/01/15 at 11:30:38

Memory for instance

   other     monh      fcmbp
   11.5M     64.0K     640.0K

Memory for database: SAMPLE

   utilh     pckcacheh other     catcacheh bph (1)   bph (S32K) bph (S16K)
   64.0K     1.0M      576.0K    448.0K    1.3M      832.0K     576.0K

   bph (S8K) bph (S4K) shsorth   lockh     dbh       apph (12) apph (11)
   448.0K    384.0K    192.0K    320.0K    10.4M     64.0K     64.0K

   apph (10) apph (9)  apph (8)
   64.0K     64.0K     64.0K

  Application Memory for database: SAMPLE

  appshrh 
  256.0K

  Memory for application 11

   apph      other
   64.0K     64.0K

  Memory for application 10

   apph      other
   64.0K     64.0K

  Memory for application 9

   apph      other
   64.0K     64.0K

  Memory for application 8

   apph      other
   64.0K     448.0K
The command db2mtrk -a -v -i -d displays the following output:
Tracking Memory on: 2007/01/15 at 11:22:56

Memory for instance

   Other Memory is of size 12058624 bytes
   Database Monitor Heap is of size 65536 bytes
   FCMBP Heap is of size 655360 bytes
   Total: 12779520 bytes

Memory for database: SAMPLE

   Backup/Restore/Util Heap is of size 65536 bytes
   Package Cache is of size 1048576 bytes
   Other Memory is of size 589824 bytes
   Catalog Cache Heap is of size 458752 bytes
   Buffer Pool Heap (1) is of size 1376256 bytes
   Buffer Pool Heap (System 32k buffer pool) is of size 851968 bytes
   Buffer Pool Heap (System 16k buffer pool) is of size 589824 bytes
   Buffer Pool Heap (System 8k buffer pool) is of size 458752 bytes
   Buffer Pool Heap (System 4k buffer pool) is of size 393216 bytes
   Shared Sort Heap is of size 196608 bytes
   Lock Manager Heap is of size 327680 bytes
   Database Heap is of size 10944512 bytes
   Application Heap (12) is of size 65536 bytes
   Application Heap (11) is of size 65536 bytes
   Application Heap (10) is of size 65536 bytes
   Application Heap (9) is of size 65536 bytes
   Application Heap (8) is of size 65536 bytes
   Applications Shared Heap is of size 524288 bytes
   Total: 18153472 bytes

  Application Memory for database: SAMPLE

  Applications Shared Heap is of size 524288 bytes
  Total: 524288 bytes

  Memory for application 11

   Application Heap is of size 65536 bytes
   Other Memory is of size 65536 bytes
   Total: 131072 bytes

  Memory for application 10

   Application Heap is of size 65536 bytes
   Other Memory is of size 65536 bytes
   Total: 131072 bytes

  Memory for application 9

   Application Heap is of size 65536 bytes
   Other Memory is of size 65536 bytes
   Total: 131072 bytes

  Memory for application 8

   Application Heap is of size 65536 bytes
   Other Memory is of size 458752 bytes
   Total: 524288 bytes

   Total: 1441792 bytes

Usage notes

Note:
  1. When no flags are specified, usage is returned.
  2. One of the -d, -h, -i, -p or -a flag must be specified.
  3. When the -p parameter is specified, detailed private memory usage information is returned, grouped by agent ID.
  4. When the -a parameter is specified, detailed application memory usage information is returned, grouped by application ID.
  5. The "Other Memory" reported is the memory associated with the usage of operating the database management system.
  6. In some cases (such as the package cache) the maximum size displayed will be larger than the value assigned to the configuration parameter. In such cases, the value assigned to the configuration parameter is used as a 'soft limit', and the pool's actual memory usage might grow beyond the configured size.
  7. For the buffer pool heaps, the number specified in the parentheses is either the buffer pool ID, or indicates that this buffer pool is one of the system buffer pools.
  8. For application heaps, the number specified in parentheses is the application ID.
  9. The maximum size that the memory tracker reports for some heaps is the amount of physical memory on the machine. These heaps are called unbounded heaps and are declared with an unlimited maximum size because when the heaps are declared, it is not clear how much memory they will require at peak times. Although these heaps are not strictly bounded by the physical memory on the machine, they are reported as the maximum size because it is a reasonable approximation.
  10. The bufferpool heaps are always fully allocated so the memory tracker will report the same values for the current and maximum sizes of these heaps. If a bufferpool size is set to automatic then the current and maximum size of the bufferpool heap will be adjusted over time based on workload and available memory.