The iostat utility is still used in Oracle to execute and interpret iostat.disk. The iostat utility is a command-line tool that provides information about disk I/O activity. It can be used to identify I/O bottlenecks and to track I/O performance over time.
The iostat utility is available on most Unix-like operating systems, including Oracle Linux. To use the iostat utility, you simply type the following command at the command prompt:
iostat
This command will display a table of information about all of the disks on your system. The table will include the following information:
Device name
Number of reads and writes per second
Average transfer rate in kilobytes per second
Average seek time in milliseconds
I/O wait time in milliseconds
Utilization percentage
You can also use the iostat utility to display information about a specific disk. To do this, you simply type the following command at the command prompt:
iostat <device name>
For example, to display information about the disk named /dev/sdb, you would type the following command at the command prompt:
iostat /dev/sdb
The iostat utility is a valuable tool for Oracle DBAs. It can be used to identify I/O bottlenecks and to track I/O performance over time. This information can be used to improve the performance of Oracle databases.
Here are some examples of how the iostat utility can be used in Oracle:
Identify I/O bottlenecks that are causing Oracle databases to slow down.
Track I/O performance over time to identify trends and patterns.
Measure the impact of changes to Oracle databases on I/O performance.
Troubleshoot I/O problems with Oracle databases.
The iostat utility is a valuable tool that can help you to improve the performance of your Oracle databases.
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:
%> c
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
Note:
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.