onstat -d command: Print chunk information
Use the onstat -d command to show information about chunks in each storage space.
>-onstat-- -d--+--------+-------------------------------------><
'-update-'
The update option updates shared memory to obtain accurate counts of free pages.
Using onstat -d with sbspaces
For information about using onstat -d to determine the size of sbspaces, user-data areas, and metadata areas, see Monitor sbspaces.
Using onstat -d with blobspaces
NOTE: For BLOB chunks, the number of free pages shown is out of date.
Run ‘onstat -d update' for current stats.
Waiting for server to update BLOB chunk statistics ...
Example output
Output description for dbspaces
- address
- Is the address of the storage space in the shared-memory space table
- number
- Is the unique ID number of the storage space that is assigned at when it is created
- flags
- Uses hexadecimal values to describe each storage space.
The individual flag values can be summed to show cumulative properties
of the dbspace. The following table describes each hexadecimal value:
Table 1. Descriptions for each hexadecimal value Flag Value Description 0x0001 Mirror is allowed and dbspace is unmirrored. 0x0002 Mirror is allowed and dbspace is mirrored. 0x0004 The dbspace contains disabled mirror chunks. 0x0008 Newly mirrored 0x0010 Blobspace 0x0020 Blobspace on removable media 0x0040 Blobspace is on optical media 0x0080 Blobspace is dropped. 0x0100 Blobspace is the optical STAGEBLOB 0x0200 Space is being recovered. 0x0400 Space is physically recovered. 0x0800 Logical log is being recovered. 0x1000 Table in dbspace is dropped. 0x2000 Temporary dbspace 0x4000 Blobspace is being backed up. 0x8000 Sbspace 0x10000 Physical or logical log changed. 0x20000 Dbspace or chunk tables changed. 0x040000 Blobspace contains large chunks. 0x080000 Chunk in this dbspace was renamed. 0x00100000 Temporary dbspace that is used by only by shared disk secondary server. It is one of the dbspaces listed in the SDS_TEMPDBS configuration parameter on the SD secondary server. 0x00200000 Temporary dbspace for the SD secondary server. Listed in the DBSPACETEMP configuration parameter on the shared disk secondary server. 0x00400000 The dbspace was externally backed up. 0x00800000 Dbspace is being defragmented. 0x01000000 Plogspace 0x10000000 The space is encrypted. - fchunk
- The ID number of the first chunk
- nchunks
- The number of chunks in the storage space
- pgsize
- The size of the dbspace pages in bytes
- flags
- Uses the following letter codes to describe each storage space: Position 1:
Flag Description M Mirrored N Not mirrored Position 2:Flag Description X Newly mirrored P Physically recovered, waiting for logical recovery L Being logically recovered R Being recovered D Down Position 3:Flag Description B Blobspace P Plogspace S Sbspace T Temporary dbspace U Temporary sbspace W Temporary dbspace on primary server (This flag is shown on SD secondary servers only.) Position 4:Flag Description B The dbspace can have large chunks that are greater than 2 GB. Position 5:Flag Description A The dbspace is auto-expandable because the SP_AUTOEXPAND configuration parameter is enabled and the dbspace is configured with a create size or extend size that is not zero. Position 6:Flag Description E The storage space is encrypted. - owner
- The owner of the storage space
- name
- The name of the storage space
In the line immediately following the storage-space list, active refers to the current number of storage spaces in the database server instance, including the root dbspace and maximum refers to total allowable spaces for this database server instance.
Output description - Chunks
- address
- The address of the chunk
- chk/dbs
- The chunk number and the associated space number
- offset
- The offset into the file or raw device in base page size
- size
- The size of the chunk in terms of the page size of the dbspace to which it belongs.
- free
- The number of unallocated pages in the chunk in units of the page size of the associated
dbspace. A value of
0
indicates that all the space in the chunk is allocated to tables, but does not indicate how much space is free inside the tables. For example, suppose you create a dbspace with one chunk of 200 MB and create one table with an extent size of 200 MB. The value of the free field is0
, indicating that the chunk has no free space, however, the new empty table has 200 MB of free space.For a blobspace, a tilde indicates an approximate number of unallocated blobpages.
For an sbspace, indicates the number of unallocated pages of user data space and total user data space.
Note: The "onstat -d" output adds footnotes for each of the down chunks that are empty, and a special foot note for the first chunk of a down space that is empty.Example Output for onstat -d with down space (due to first chunk out of 4), where 2 of the 4 chunks are empty and can be dropped:
Example Output for onstat -d when all chunks in down space are empty and can be dropped:Chunks address chunk/dbs offset size free bpages flags pathname 44be2268 1 1 0 150000 83059 PO-B-- /spaces/rootchunk 45c2b028 2 2 0 512 0 PD-BE- /spaces/dbspace2_p_1 45c2c028 3 2 0 500 * PD-BE- /spaces/dbspace2_p_2 45c2d028 4 2 0 500 * PD-BE- /spaces/dbspace2_p_3 45c2e028 5 2 0 5000 0 PD-BE- /spaces/dbspace2_p_4 5 active, 32766 maximum NOTE: The values in the "size" and "free" columns for DBspace chunks are displayed in terms of "pgsize" of the DBspace to which they belong. * Down chunk is empty, and may be safely dropped.
Chunks address chunk/dbs offset size free bpages flags pathname 44be2268 1 1 0 150000 83059 PO-B-- /spaces/rootchunk 45c2b028 2 2 0 512 ** PD-BE- /spaces/dbspace2_p_1 45c2c028 3 2 0 500 * PD-BE- /spaces/dbspace2_p_2 45c2d028 4 2 0 500 * PD-BE- /spaces/dbspace2_p_3 45c2e028 5 2 0 5000 * PD-BE- /spaces/dbspace2_p_4 5 active, 32766 maximum NOTE: The values in the "size" and "free" columns for DBspace chunks are displayed in terms of "pgsize" of the DBspace to which they belong. * Down chunk is empty, and may be safely dropped. ** Down space is empty, and may be safely dropped.
- bpages
- Is the size of the chunk in blobpages
Blobpages can be larger than disk pages; therefore, the bpages value can be less than the size value.
For an sbspace, is the size of the chunk in sbpages.
- flags
- Provides the chunk status information as follows: Position 1:
Flag Description P Primary M Mirror Position 2:Flag Description N Renamed and either Down or Inconsistent O Online D Down X Newly mirrored I Inconsistent Position 3:Flag Description - Dbspace B Blobspace S Sbspace Position 4:Flag Description B The dbspace can have large chunks that are greater than 2 GB. Position 5:Flag Description E Identifies the chunk as extendable - Identifies the chunk as not extendable Position 6:Flag Description - The direct I/O or concurrent I/O option is not enabled for this cooked file chunk C On AIX®, the concurrent I/O option is enabled for this cooked file chunk D The direct I/O option is enabled for this cooked file chunk - pathname
- The path name of the physical device
In the line immediately following the chunk list, active shows the number of active chunks (including the root chunk) and maximum shows the total number of chunks.
For information about page reads and page writes, run the onstat -D command.