Almost every flavor of the UNIX operating system has a version of the iostat utility. The purpose of iostat is to provide
an elapsed time measure of the amount of physical I/O addressed to the disk devices. This elapsed time measure is a log showing the number of times that the physical drive is accessed. To run the iostat utility, enter the following command:
%> iostat 5
The “iostat 5” says to display one line of output for every disk attached to our database server. In this case we get 37 lines of output every 5 seconds, each showing the amount of I/O for each disk.
View the code belwo to see the entire output.
This diagram below gives a detailed overview of the output headers.
Capturing Data with Shell Script
You can write a shell script to capture this iostat data and place it into Oracle tables. Click the MouseOver button to see such a script. Once the data is stored inside an Oracle table, you can run queries against the table to get historical I/O information.
Disk Array Package
If you are using a disk array package with a memory cache (such as EMC), the physical I/O statistics may be misleading. This is because some I/O may be fetched from the disk memory cache and did not result in a real disk I/O. The next lesson describes more about hot disks.