onstat -g nbm command: Print a block bit map

Use the onstat -g nbm command to display the block bit map for the nonresident segments.

Each bit of the bitmap represents a 4 KB block. If the block is used, then the bit is set to 1. If the block is free, the bit is set to 0. The bitmap is shown as a series of hexadecimal numbers. The bits, and therefore the blocks, are numbered starting at 0 so the first block is block 0, the second is block 1, and so on.

Figure 1: Syntax:

1  onstat   -g nbm

Example output

This example shows the bitmap for the segment of virtual memory at 0x10CC00000. The bitmap itself is at 0x10CC00290. All 1792 blocks of the segment are free except for block 0 and block 1023.
Figure 2: onstat -g nbm command output
Block bitmap for virtual segment address 0x10cc00000:
 address = 0x10cc00290, size(bits) = 1792
 used = 1, largest_free = -1
      0:8000000000000000 0000000000000000 0000000000000000 0000000000000000 
    256:0000000000000000 0000000000000000 0000000000000000 0000000000000000 
    512:0000000000000000 0000000000000000 0000000000000000 0000000000000000 
    768:0000000000000000 0000000000000000 0000000000000000 0000000000000001 
   1024:0000000000000000 0000000000000000 0000000000000000 0000000000000000 
   1280:0000000000000000 0000000000000000 0000000000000000 0000000000000000 
   1536:0000000000000000 0000000000000000 0000000000000000 0000000000000000 

Output description

address
The starting address of the bitmap.
size
The number of bits in the bitmap. This is also the number of 4 KB blocks in the memory segment.
used
The total number of bits in the bitmap that are set to 1. This is also the number of 4 KB blocks that are in use in the memory segment.
largest free
If this is a value other than -1 it is the largest number of consecutive bits that are free, which is also the number of 4 KB blocks in the largest contiguous set of blocks in the memory segment.

A value of -1 means that the largest free space has not been calculated. The database server only calculates the largest free space if it tries to allocate a set of blocks starting at the lastalloc block but there is not enough free space. The value is set to -1 again as soon as another block is allocated in the segment.