Home | Previous Page | Next Page   Disk, Memory, and Process Management > Managing Disk Space > Monitoring Disk Usage >

Monitoring Chunks

You can monitor chunks for the following information:

This information allows you to track the disk space used by chunks, monitor chunk I/O activity, and check for fragmentation.

Using Command-Line Utilities

You can use the following command-line utilities to obtain information about chunks.

onstat -d

The onstat -d utility lists all dbspaces and the following information for the chunks within those spaces.

The dbspace flags indicate whether a dbspace is mirrored. The chunk flags provide the following information:

Important:
You must perform a level-0 backup of the root dbspace and the modified dbspace before mirroring can become active, and after turning off mirroring.

Sample output for onstat -D, which displays the same information plus two additional fields, appears in Figure 69. For descriptions of the onstat -d flags, see the utilities chapter in the IBM Informix: Administrator's Reference.

onstat -D

The onstat -D option displays the same information as onstat -d, plus the number of pages read from the chunk (in the page Rd field).

Figure 69 shows sample output.

Figure 69. onstat -D Output
Dbspaces
address  number   flags    fchunk   nchunks  flags    owner    name
40d100   1        1        1        1        N        informix rootdbs
40d144   2        2        2        1        M        informix cookedspace
40d188   3        10       3        1        N B      informix cookedblob
 3 active, 10 total

Chunks
address  chk/dbs offset   page Rd  page Wr  pathname
40c274   1   1   0        146      4        /home/server/root_chunk
40c30c   2   2   0        1        0        /home/server/test_chunk
40c8fc   2   2   0        36       0        /home/server/test_mirr
40c3a4   3   3   0        4        0        /home/server/blob_chunk
 3 active, 10 total
onstat -g iof

The onstat -g iof option displays the number of reads from each chunk and the number of writes to each chunk. If one chunk has a disproportionate amount of I/O activity against it, this chunk might be a system bottleneck. This option is useful for monitoring the distribution of I/O requests against the different fragments of a fragmented table. Figure 70 shows sample output.

Figure 70. onstat -g iof Output
...
AIO global files:
gfd pathname         totalops  dskread dskwrite  io/s
  3 raw_chunk           38808    27241    11567   6.7
  4 cooked_chk1          7925     5660     2265   1.4
  5 cooked_chk2          3729     2622     1107   0.6   
onutil CHECK RESERVED

To list the contents of the reserve pages, execute onutil CHECK RESERVED.

onutil CHECK SPACE

To obtain the physical layout of information, execute onutil CHECK SPACE.

The following information is displayed:

The tables within a chunk are listed sequentially. This output is useful for determining the extent of chunk fragmentation. If the database server is unable to allocate an extent in a chunk despite an adequate number of free pages, the chunk might be badly fragmented.

Using SMI Tables

Query the syschunks table to obtain the status of a chunk. The following columns are relevant.

Column
Description
chknum
Number of the chunk within the dbspace
dbsnum
Number of the dbspace
chksize
Total size of the chunk in pages
nfree
Number of pages that are free
is_offline
Whether the chunk is down
is_recovering
Whether the chunk is recovering
mis_offline
Whether the mirror chunk is down
mis_recovering
Whether the mirror chunk is being recovered

The syschkio table contains the following columns.

Column
Description
pagesread
Number of pages read from the chunk
pageswritten
Number of pages written to the chunk
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]