onstat -g seg command: Print shared memory segment statistics

Use the onstat -g seg command to show the statistics for shared memory segments.

This command shows how many segments are attached and their sizes. You can run the onstat -g seg command on a dump file that was created without the buffer pool.

Figure 1: Syntax:

1  onstat   -g seg

Example output

Figure 2: onstat -g seg command output
Segment Summary:
id         key        addr     size       ovhd     class blkused  blkfree 
720914    52e44801  44000000 4390912    248812  R    1072     0      
753683    52e44802  44430000 131072000  769136  V    22573    9427    
819221    52e44803  4c130000 66027520  1        B    16120    0      
851990    52e44804  50028000 83648512  1        B    20422    0      
Total:    -          -       285138944 -        -    60187    9427
Virtual segment low memory reserve (bytes):4194304 
Low memory reserve used 0 times and used maximum block size 0 bytes
id         key        addr     size       ovhd     class blkused  blkfree 
8945678    52604801   44000000 133652480  1006264  R     32627    3       
8978447    52604802   4bf76000 131072000  769136   V     17181    14819   
Total:     -          -        264724480  -        -     49808    14822   

   (* segment locked in memory)
Virtual segment low memory reserve (bytes):4194304 
Low memory reserve used 0 times and used maximum block size 0 bytes

Output description

id
The ID of the shared memory segment
key
The shared memory key that is associated with the shared memory segment ID
addr
The address of the shared memory segment
size
The size of the shared memory segment in bytes
ovhd
The size of the shared memory segment control information (overhead) in bytes
class
The class of the shared memory segment (B is for Buffferpool, R is for Resident, V is for Virtual, VX is for Virtual Extended, and M is for Message.)
The class of the shared memory segment (R is for Resident, V is for Virtual, VX is for Virtual Extended, and M is for Message.)
blkused
The number of blocks of used memory
blkfree
The number of blocks of free memory
Virtual segment low memory reserve (bytes)
The size of reserved memory for use when critical activities are needed and the server has limited free memory, specified in bytes (You specify reserved memory in the LOW_MEMORY_RESERVE configuration parameter.)
Low memory reserve used 0 times and used maximum block size 0 bytes)
The number times that the server used the reserved memory and the maximum memory needed