iostat 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-iostat
핵심 정리
- CPU, TTY, 디스크·테이프·CD-ROM, 어댑터, 비동기 I/O(AIO), 파일 시스템(6.1)의 사용률과 처리량을 보고합니다.
iostat 2 5는 2초 간격으로 5번입니다. - 간격 없이 실행하면 부팅 뒤 통계를 한 번 보여 줍니다. 디스크 기록 수집이 꺼져 있으면
Disk History Since Boot Not Available이 나옵니다(chdev -l sys0 -a iostat=true로 켬). - 디스크 보고의
% tm_act(활성 시간 비율)가 높고 디스크마다 고르지 않으면 병목을 의심합니다.% iowait는 입출력을 기다린 유휴 시간입니다. -D는 확장 보고(읽기·쓰기 서비스 시간, 대기 큐avgwqsz,sqfull등),-a는 어댑터,-s는 시스템 전체,-A·-P는 AIO,-m은 경로(MPIO),-p는 테이프,-T는 시각입니다.- 6.1에서
-b(블록 I/O 장치,raso의 biostat 필요),-f·-F(파일 시스템),-S(배율),-V(0이 아닌 값만),-@(WPAR)가 생겼습니다. -z는 디스크 입출력 통계를 0으로 되돌립니다(root만).
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 -b, -f, -F, -S, -V, -@와 그 보고서, 예제 17~22가 더해짐) |
| 원문 | IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3 |
| 파일 | /usr/bin/iostat |
| 관련 명령어 | vmstat, sar, topas, filemon, lsattr |
목적
CPU 통계, 비동기 입출력(AIO), 시스템 전체·어댑터·TTY 장치·디스크·CD-ROM·테이프·파일 시스템의 입출력 통계를 보고합니다.
영어 원문
Reports Central Processing Unit (CPU) statistics, asynchronous input/output (AIO) and input/output statistics for the entire system, adapters, TTY devices, disks CD-ROMs, tapes and file systems.
구문
iostat [ -a ] [ -b ] [ -l ] [ -s ] [ -t ] [ -T ] [ -V ] [ -z ]
[ { -A [ -P ] [ -q | -Q ] } | { [ -d | -p ] [ -D ] [ -R ] } [ -m ] ]
[ { -f | -F } [ filesystems,... ] ] [ -S power ] [ -@ wparname | ALL | Global ]
[ drives ... ] [ interval ] [ count ]
-b,-V,-f,-F,-S,-@는 6.1 구문에만 있습니다.- WPAR 안에서는
-a,-A,-b,-d,-D,-m,-p,-P,-q,-Q,-R,-t,-z와 drives, wparname 매개변수를 쓸 수 없습니다. -b는 간격을 꼭 지정해야 하며 최소 2초입니다. 블록 I/O 통계는raso의biostat조정 값으로 켜야 하고, 켠 뒤 통계가 채워지기까지 몇 초 걸리므로 잠시 기다렸다가iostat -b를 실행합니다.
설명
iostat 명령은 시스템 입출력 장치(물리·논리)가 활성인 시간을 살펴 부하를 감시합니다. 그 보고로 파일 시스템, 물리 볼륨, 어댑터 사이의 입출력 부하를 더 고르게 맞추도록 시스템 구성을 바꿀 수 있습니다.
- 지정한 옵션에 따라 여러 사용률·처리량 보고서를 만듭니다. 다중 프로세서 시스템에서 CPU 통계는 모든 프로세서의 평균입니다.
- 보고서는 시스템 구성 정보와 여러 보고서로 이뤄집니다. 구성 줄은 시작할 때와 감시 중인 구성이 바뀔 때 나오며,
-@를 쓰면 자원 한도를 강제한 WPAR의 구성도 나옵니다. - 원문은 "
-X옵션을 주면 XML 파일을 만든다"고 하지만 구문과 플래그 표에는-X가 없습니다.
| 구성 항목 | 뜻 |
|---|---|
lcpu |
논리 CPU 수 |
drives |
디스크 수(CD 포함). 어댑터·디스크·CD를 감시할 때만 |
tapes |
테이프 수. 어댑터·테이프를 감시할 때만 |
ent |
할당 용량. 공유 프로세서일 때만 |
vdisk |
가상 장치 수. 어댑터·디스크·CD를 감시할 때만 |
wpars |
활성 시스템 WPAR 수. -@일 때만(6.1) |
maxserver |
느린 경로 입출력을 처리할 수 있는 AIO 서버의 최대 수(시스템 전체). AIO를 감시할 때만 |
cpulim |
WPAR의 프로세서 자원 한도(프로세서 단위)(6.1) |
rset |
WPAR에 연결된 자원 집합 형식(regular, exclusive)(6.1) |
Interval은 보고 사이의 초입니다. Interval이 없으면 부팅 뒤 통계를 담은 보고서 하나를 만듭니다. Count는 Interval과 함께 쓰며 보고 횟수를 정하고, Interval만 주면 계속 보고합니다.
iostat는 물리 볼륨이 성능 병목이 되는지, 개선할 여지가 있는지 알아보는 데 좋습니다. 물리 볼륨의 % 사용률은 파일 활동이 드라이브에 얼마나 고르게 퍼져 있는지 보여 주며, 높으면 그 자원에 경합이 있다는 신호입니다. CPU 사용률도 함께 나오므로 CPU가 입출력을 기다린 시간도 동시에 알 수 있습니다. 입출력 대기가 크고 디스크 사용률이 고르지 않으면 데이터를 여러 드라이브에 나눠 두는 것을 생각합니다.
AIX 5.3부터 Micro-Partitioning 환경에서는 소비한 물리 프로세서 수(physc)와 할당 용량 소비 비율(% entc)을 보고합니다.
참고: iostat용 디스크 입출력 기록을 유지하는 데 시스템 자원이 조금 듭니다. sysconfig 서브루틴이나 SMIT로 기록을 멈출 수 있습니다. 실행 중에 출력에 영향을 주는 구성이 바뀌면 경고를 출력하고, 바뀐 구성과 머리글을 다시 출력한 뒤 계속합니다.
-a를 주면 어댑터 머리 줄, 어댑터 통계 줄, 그 어댑터에 연결된 디스크·테이프의 머리 줄과 통계 순서로 보고합니다.- Drive 매개변수를 주면 그 드라이브만 보고합니다(TTY·CPU 보고는 함께 나옴). 없는 이름이면
Drive Not Found를 보여 주고 모든 드라이브를 보고합니다. 드라이브 이름의 첫 글자는 숫자일 수 없습니다. - 테이프 사용률 보고는
-p나-a를 줄 때만 만듭니다.-@는 WPAR 안에서 쓸 수 없습니다. - (6.1)
-@ ALL에서 WPAR 값이 없는 지표는-로,-@ WparName이나 WPAR 안에서는@를 붙여 시스템 전체 값으로 보여 줍니다. 그 버전에서 쓸 수 없는 지표는-입니다.
TTY와 CPU 사용률 보고
다중 프로세서 시스템에서 CPU 값은 모든 프로세서의 전체 평균이며, 입출력 대기 상태도 프로세서별이 아니라 시스템 전체로 정의됩니다. 값은 커널이 정기적으로(보통 초당 60번) 갱신합니다.
| 열 | 뜻 |
|---|---|
tin |
시스템이 모든 TTY에서 읽은 문자 수 |
tout |
시스템이 모든 TTY에 쓴 문자 수 |
% user |
사용자 수준(응용 프로그램)에서 실행한 CPU 사용률 |
% sys |
시스템 수준(커널)에서 실행한 CPU 사용률 |
% idle |
CPU가 유휴이고 남은 디스크 입출력 요청이 없던 시간 비율 |
% iowait |
CPU가 유휴인데 남은 디스크 입출력 요청이 있던 시간 비율 |
physc |
소비한 물리 프로세서 수(또는 일부). 공유 프로세서일 때만 |
% entc |
소비한 할당 용량 비율. 공유 프로세서일 때만. 짧은 간격에서는 100%를 넘을 수 있음 |
% rc |
소비한 프로세서 자원 비율. 프로세서 한도를 강제한 WPAR만(6.1) |
입출력 대기 시간의 계산: AIX는 그 CPU에서 시작한 입출력이 남아 있을 때만 유휴 CPU를 wio로 표시합니다. 그래서 스레드 몇 개만 입출력을 하고 나머지가 한가하면 wio가 훨씬 낮게 나옵니다. 예를 들어 CPU 4개에 입출력 스레드가 하나면 wio는 최대 25%, CPU 12개면 최대 8%입니다. NFS 클라이언트의 읽기·쓰기는 VMM을 거치며, biod가 VMM에서 입출력을 기다린 시간도 입출력 대기로 보고합니다.
디스크·테이프 사용률 보고
기본으로 디스크 사용률 보고가 나오고, 테이프는 -p를 줘야 나옵니다. -m을 주면 경로 사용률 보고가 나옵니다.
| 열 | 뜻 |
|---|---|
% tm_act |
물리 디스크·테이프가 활성이던 시간 비율(드라이브의 대역폭 사용률) |
Kbps |
드라이브로 전송한(읽거나 쓴) 데이터 양(KB/초) |
tps |
물리 디스크·테이프에 낸 초당 전송 수. 전송은 입출력 요청 하나이며 크기는 정해져 있지 않음. 논리 요청 여러 개가 하나로 합쳐질 수 있음 |
Kb_read |
읽은 KB 합계 |
Kb_wrtn |
쓴 KB 합계 |
-D를 주면 확장 보고가 나옵니다(테이프는 -p도 필요).
| 묶음 | 열 | 뜻 |
|---|---|---|
| xfer | % tm_act, tps |
위와 같음 |
| xfer | bps |
초당 전송한 데이터 양(기본 바이트, 단위 접미사 사용) |
| xfer | bread, bwrtn |
초당 읽은·쓴 데이터 양 |
| read | rps |
초당 읽기 전송 수 |
| read | avgserv, minserv, maxserv |
읽기 전송당 평균·최소·최대 서비스 시간(기본 ms) |
| read | timeouts, fails |
초당 읽기 시간 초과 수, 실패한 읽기 요청 수 |
| write | wps |
초당 쓰기 전송 수 |
| write | avgserv, minserv, maxserv |
쓰기 전송당 평균·최소·최대 서비스 시간(기본 ms) |
| write | timeouts, fails |
초당 쓰기 시간 초과 수, 실패한 쓰기 요청 수 |
| queue | avgtime, mintime, maxtime |
전송 요청이 대기 큐에서 보낸 평균·최소·최대 시간(기본 ms). 테이프에는 해당 없음 |
| queue | avgwqsz |
평균 대기 큐 크기 |
| queue | avgsqsz |
평균 서비스 큐 크기 |
| queue | sqfull |
서비스 큐가 가득 찬(디스크가 요청을 더 받지 않는) 초당 횟수 |
단위 접미사: K 1,000바이트, M 1,000,000바이트(xfer) 또는 분(서비스 시간), G 10억 바이트, T 1조 바이트, S 초, H 시간. 서비스 시간 지표를 지원하지 않는 드라이브는 read·write·queue 지표가 나오지 않습니다. CD-ROM 통계도 보고합니다.
블록 I/O 장치 사용률 보고(6.1, -b)
장치별 입출력 통계로, VMM·파일 시스템·디스크 계층의 입출력을 분석하는 데 씁니다.
| 열 | 뜻 |
|---|---|
device |
장치 이름 |
rbytes, wbytes |
감시 기간에 읽은·쓴 바이트(필요하면 K=1024, M=1024K 접미사) |
rserv, wserv |
읽기당·쓰기당 서비스 시간(기본 ms) |
rerr, werr |
읽기·쓰기 오류 수(필요하면 K=1000, M, G 접미사) |
reads, writes |
읽기·쓰기 요청 수 |
시스템 처리량 보고(-s)
시스템 전체의 Kbps, tps, Kb_read, Kb_wrtn을 보고합니다. (6.1) -@나 -f와 함께 쓰면 논리 볼륨(파일 시스템)과 물리 볼륨(디스크)의 처리량을 함께 보여 줍니다.
어댑터 처리량 보고(-a)
물리 어댑터는 Kbps, tps, Kb_read, Kb_wrtn을 보고합니다. 가상 어댑터는 Kbps, tps, bkread(호스팅 서버에서 받은 초당 블록), bkwrtn(호스팅 서버로 보낸 초당 블록), partition-id(요청을 처리하는 호스팅 서버의 파티션 ID)를 보고합니다. -D를 주면 가상 어댑터의 읽기·쓰기 서비스 지표(rps·wps, 호스팅 서버의 응답을 받기까지의 avgserv·minserv·maxserv)와 대기 큐 지표(avgtime, mintime, maxtime, avgwqsz, avgsqsz, sqfull)도 나옵니다.
비동기 I/O 보고
| 열 | 뜻 |
|---|---|
avgc |
기간 동안 초당 평균 전역 AIO 요청 수 |
avfc |
기간 동안 초당 평균 fastpath 요청 수 |
maxgc |
지난번에 읽은 뒤 최대 전역 AIO 요청 수 |
maxfc |
지난번에 읽은 뒤 최대 fastpath 요청 수 |
maxreqs |
한 번에 남아 있을 수 있는 AIO 요청의 최대 수 |
파일 시스템 사용률 보고(6.1, -f·-F)
파일 시스템마다 Filesystem, % tm_act, Kbps, Tps, Kb_read, Kb_wrtn을 보고합니다. 디스크 이름은 -f·-F보다 앞에 지정해야 하며, 감시할 파일 시스템 이름은 쉼표로 나눕니다.
디스크 입출력 기록
성능을 위해 디스크 입출력 통계 수집은 기본으로 꺼져 있습니다. 켜려면 다음 명령을, 현재 설정을 보려면 둘째 명령을 씁니다. 꺼진 상태에서 간격 없이 iostat를 부르면 디스크 통계 대신 Disk History Since Boot Not Available이 나옵니다.
chdev -l sys0 -a iostat=true
lsattr -E -l sys0 -a iostat
영어 원문
The iostat command is used to monitor system input/output (I/O) devices (physical and logical) that are loaded, by observing the time for which these devices are active. The iostat command also generates reports that can be used to change system configuration to better balance the I/O load between file systems, physical volumes, and adapters.
The iostat command generates an XML file when the –X option is specified.
The iostat command generates various utilization and throughput reports based on the options that you specify. On multiprocessor systems, CPU statistics are calculated system-wide as averages among all processors.
A report generated by the iostat command consists of system configuration information and various utilization and throughput reports. The system configuration row displays at the start of the iostat command and whenever there is a change in monitored configuration. In addition to system configuration, WPAR configuration is also displayed for the WPAR that has enforced resource limits when the -@ flag is used.
The system configuration and WPAR configuration information includes the following values:
lcpu Indicates the number of logical CPUs.
drives Indicates the number of disks (including CDs). This information is displayed only when adapters, disks, or CDs are monitored.
tapes Indicates the number of tapes. This information is displayed only when adapters or tapes are monitored.
ent Indicates the entitled capacity. This information is displayed only when the partition is running with shared processor.
vdisk Indicates the number of virtual devices. This information is displayed only when adapters, disks, or CDs are monitored.
wpars Indicates the number of active system workload partitions. This information is displayed only when you specify the -@ flag.
maxserver Indicates the maximum number of AIO servers that can serve slow-path IOs. This is a system-wide value. It is displayed only if asynchronous I/O is monitored.
cpulim Indicates the processor-resource limit for a WPAR in terms of processor units. This information is displayed only for WPARs with enforced processor-resource limit.
rset Indicates the resource-set type (regular or exclusive) that is associated with the WPAR. This information is displayed only when there is a resource set that is associated with the WPAR.
The Interval parameter specifies the amount of time in seconds between each report. If the Interval parameter is not specified, the iostat command generates a single report containing statistics for the time since system startup (boot). The Count parameter can be specified in conjunction with the Interval parameter. If the Count parameter is specified, the value of count determines the number of reports generated at Interval seconds apart. If the Interval parameter is specified without the Count parameter, the iostat command generates reports continuously.
The iostat command is useful in determining whether a physical volume is becoming a performance bottleneck and if there is potential to improve the situation. The % utilization field for the physical volumes indicates how evenly the file activity is spread across the drives. A high % utilization on a physical volume is a good indication that there may be contention for this resource. Since the CPU utilization statistics are also available with the iostat report, the percentage of time the CPU is in I/O wait can be determined at the same time. Consider distributing data across drives if the I/O wait time is significant and the disk utilization is not evenly distributed across volumes.
Beginning with AIX 5.3, the iostat command reports number of physical processors consumed (physc) and the percentage of entitlement consumed (% entc) in Micro-Partitioning® environments. These metrics will only be displayed on Micro-Partitioning environments.
Note: Some system resource is consumed in maintaining disk I/O history for the iostat command. Use the sysconfig subroutine, or the SMIT to stop history accounting. While the iostat command is running for Count of iterations and if there is a change in system configuration that affects the output of iostat command, it prints a warning message about the configuration change. It then continues the output after printing the updated system configuration information and the header.
If you specify the -a flag, the information is displayed in a report in the following order:
An adapter-header row.
A line of statistics for the adapter.
A disk or tape-header row and the statistics of all the disks, CD-ROMs, or tapes connected to the adapter. Such reports are generated for all the disk or tape adapters that are connected to the system.
A line of statistics for each disk or tape that is configured.
If the Drive parameter is specified, only those names specified are displayed. One or more alphabetic or alphanumeric values can be specified for Drives. If you specify the Drive parameter, the TTY and CPU reports are displayed and the disk or tape report contains statistics for the specified drives. If a drive name that you specified is not found, the report lists that name and displays the message Drive Not Found and gives the report of all the available drives on the system. If you did not configure drives on the system, no disk or tape report is generated.
Restriction: The first character in the Drive parameter cannot be numeric.
Tape utilization report is generated only if you specified the –p or -a flag.
Note: The -@ option is not supported when executed within a workload partition.
Reports
The iostat command generates four types of reports, the TTY and CPU utilization report, the disk/tape utilization report, the file system utilization report, the system throughput report and the adapter throughput report.
Tips:
When you invoke the iostat command with the
-@ALL option, if there is no information related to a workload partition (WPAR) for a metric, a dash ( - ) is displayed in the place of a value.When you invoke the iostat command with the
-@WparName option or inside a WPAR, if there is no information related to a workload partition (WPAR) for a metric, that metric is marked with "@" and the system-wide value is displayed for that metric.If a metric is not available for that release, a dash ( - ) is displayed in the place of a value.
TTY and CPU Utilization Report
The first report generated by the iostat command is the TTY and CPU utilization report. For multiprocessor systems, the CPU values are global averages among all processors. Also, the I/O wait state is defined system-wide and not per processor. The report has the following format:
Column Description tin Shows the total number of characters read by the system for all TTYs. tout Shows the total number of characters written by the system to all TTYs. % user Shows the percentage of CPU utilization that occurred while executing at the user level (application). % sys Shows the percentage of CPU utilization that occurred while executing at the system level (kernel). % idle Shows the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. % iowait Shows the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. physc Shows the number or the fraction of physical processors consumed, displayed only if the partition is running with shared processor. % entc Shows the percentage of entitled capacity consumed, which is displayed only if the partition is running with shared processor. Because the time base over which this data is computed can vary, the entitled capacity percentage can sometimes exceed 100%. This excess is noticeable only with small sampling intervals. % rc Shows the percentage of the consumed processor resource. The information is displayed only for WPARs with enforced processor-resource limit.
This information is updated at regular intervals by the kernel (typically sixty times per second). The TTY report provides a collective account of characters per second received from all terminals on the system as well as the collective count of characters output per second to all terminals on the system.
Methods Used to Compute CPU Disk I/O Wait Time
The method used to compute CPU disk I/O wait time is as follows: The AIX operating system only marks an idle CPU as wio if an outstanding I/O was started on that CPU. This method can report much lower wio times when just a few threads are doing I/O and the system is otherwise idle. For example, a system with four CPUs and one thread doing I/O will report a maximum of 25 percent wio time. A system with 12 CPUs and one thread doing I/O will report a maximum of 8 percent wio time. NFS client reads/writes go through the VMM, and the time that biods spend in the VMM waiting for an I/O to complete is now reported as I/O wait time.
Disk/Tape Utilization Report
The second report generated by the iostat command is the disk/tape utilization report. By default, the disk utilization report is displayed, and you must specify the -p flag to display the tape utilization report.
When you specify the -m flag, the path utilization report is displayed.
The disk report provides statistics on a per-physical-disk basis, and tape utilization report provides statistics on a per-tape-basis. The default report has the following format:
% tm_act— Indicates the percentage of time the physical disk/tape was active (bandwidth utilization for the drive).Kbps— Indicates the amount of data transferred (read or written) to the drive in KB per second.tps— Indicates the number of transfers per second that were issued to the physical disk/tape. A transfer is an I/O request to the physical disk/tape. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size.Kb_read— The total number of KB read.Kb_wrtn— The total number of KB written.
If you specify the -D flag, the report has the following metrics for disk/tape. Extended metrics for disk are displayed by default and users need to specify the –p option for tape utilization report:
Metrics related to transfers (xfer): % tm_act Indicates the percentage of time the physical disk/tape was active (bandwidth utilization for the drive). bps Indicates the amount of data transferred (read or written) per second to the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes per second. tps Indicates the number of transfers per second that were issued to the physical disk/tape. A transfer is an I/O request to the physical disk/tape. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size. bread Indicates the amount of data read per second, from the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes per second. bwrtn Indicates the amount of data written per second, to the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes per second.
Read Service Metrics (read): rps Indicates the number of read transfers per second. avgserv Indicates the average service time per read transfer. Different suffixes are used to represent the unit of time. Default is in milliseconds. minserv Indicates the minimum read service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. maxserv Indicates the maximum read service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. timeouts Indicates the number of read timeouts per second. fails Indicates the number of failed read requests per second.
Write Service Metrics (write): wps Indicates the number of write transfers per second. avgserv Indicates the average service time per write transfer. Different suffixes are used to represent the unit of time. Default is in milliseconds. minserv Indicates the minimum write service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. maxserv Indicates the maximum write service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. timeouts Indicates the number of write timeouts per second. fails Indicates the number of failed write requests per second.
- Wait Queue Service Metrics (queue): — Restriction: These metrics are not applicable for tapes.
avgtime— Indicates the average time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds.mintime— Indicates the minimum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds.maxtime— Indicates the maximum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds.avgwqsz— Indicates the average wait queue size.avgsqsz— Indicates the average service queue size.sqfull— Indicates the number of times the service queue becomes full (that is, the disk is not accepting any more service requests) per second.- Suffix Description
K 1000 bytes M 1 000 000 bytes if displayed in xfer metrics. Minutes, if displayed in read/write/wait service metrics. G 1 000 000 000 bytes. T 1 000 000 000 000 bytes. S Seconds. H Hour.
Note: For drives that do not support service time metrics, read, write and wait queue service metrics will not be displayed.
Statistics for CD-ROM devices are also reported.
Block IO Device Utilization Report
The Block IO Device Utilization report provides statistics per IO device. The report helps you in analyzing the IO statistics at VMM or filesystem, and disk layers of IO stack. The report also helps you in analyzing the performance of the IO stack. The default report has the following format:
device— Indicates the device name.rbytes— Indicates the number of bytes read over the monitoring interval. Default unit is bytes; a suffix will be appended if required (1024 =K, 1024K =M).wbytes— Indicates the number of bytes written over the monitoring interval. Default unit is bytes; a suffix will be appended if required.rserv— Indicates the read service time per read over the monitoring interval. Different suffixes are used to represent unit, default unit is millisecond.wserv— Indicates the write service time per write over the monitoring interval. Different suffixes are used to represent unit, default unit is millisecond.rerr— Indicates the number of read errors over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G).werr— Indicates the number of write errors over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G).reads— Indicates the number of read requests over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G).writes— Indicates the number of write requests over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G).- System Throughput Report
This report is generated if the -s flag is specified. This report provides statistics for the entire system. This report has the following format:
Kbps— Indicates the amount of data transferred (read or written) in the entire system in KB per second.tps— Indicates the number of transfers per second issued to the entire system.Kb_read— The total number of KB read from the entire system.Kb_wrtn— The total number of KB written to the entire system.- Tip: The
-sflag, when used with the-@or-fflag, displays logical and physical volume throughput,
which corresponds to File Systems and Disks respectively.
Adapter Throughput Report
This report is generated if the -a flag is specified. This report provides statistics on an adapter-by-adapter basis (for both physical and virtual adapters). This report has the following format for a physical adapter report:
Kbps— Indicates the amount of data transferred (read or written) in the adapter in KB per second.tps— Indicates the number of transfers per second issued to the adapter.Kb_read— The total number of KB read from the adapter.Kb_wrtn— The total number of KB written to the adapter.
The virtual adapter's default throughput report has the following format:
Kbps— Indicates the amount of data transferred (read or written) in the adapter in KB per second.tps— Indicates the number of transfers per second issued to the adapter.bkread— Number of blocks received per second from the hosting server to this adapter.bkwrtn— Number of blocks per second sent from this adapter to the hosting server.partition-id— The partition ID of the hosting server, which serves the requests sent by this adapter.
The virtual adapter's extended throughput report (-D option) has the following format:
Metrics related to transfers (xfer:) Kbps Indicates the amount of data transferred (read or written) in the adapter in KB per second. tps Indicates the number of transfers per second issued to the adapter. bkread Number of blocks received per second from the hosting server to this adapter. bkwrtn Number of blocks per second sent from this adapter to the hosting server. partition-id The partition ID of the hosting server, which serves the requests sent by this adapter.
Adapter Read Service Metrics (read:) rps Indicates the number of read requests per second. avgserv Indicates the average time to receive a response from the hosting server for the read request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. minserv Indicates the minimum time to receive a response from the hosting server for the read request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. maxserv Indicates the maximum time to receive a response from the hosting server for the read request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds.
Adapter Write Service Metrics (write:) wps Indicates the number of write requests per second. avgserv Indicates the average time to receive a response from the hosting server for the write request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. minserv Indicates the minimum time to receive a response from the hosting server for the write request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. maxserv Indicates the maximum time to receive a response from the hosting server for the write request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds.
Adapter Wait Queue Metrics (queue:) avgtime Indicates the average time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. mintime Indicates the minimum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. maxtime Indicates the maximum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. avgwqsz Indicates the average wait queue size. avgsqsz Indicates the average service queue size. sqfull Indicates the number of times the service queue becomes full (that is, the hosting server is not accepting any more service requests) per second.
Suffix Description K 1000 bytes. M 1 000 000 bytes if displayed in xfer metrics. Minutes, if displayed in read/write/wait service metrics. G 1 000 000 000 bytes. T 1 000 000 000 000 bytes. S Seconds. H Hours.
Asynchronous I/O Report
The asynchronous I/O report has the following column headers :
avgc— Average global AIO request count per second for the specified interval.avfc— Average fastpath request count per second for the specified interval.maxgc— Maximum global AIO request count since the last time this value was fetched.maxfc— Maximum fastpath request count since the last time this value was fetched.maxreqs— Specifies the maximum number of asynchronous I/O requests that can be outstanding at one time.- File System Utilization Report
The file system utilization report provides statistics on a per-file-system basis. The default report has the following format:
Filesystem— Indicates the file system name.% tm_act— Indicates the percentage of time the file system is active.Kbps— Indicates the amount of data transferred (read or written) to the file system in KB per second.Tps— Indicates the number of transfers per second that are issued to the file system. A transfer is of indeterminate size.Kb_read— The total number of KBs read.Kb_wrtn— The total number of KBs written.- Important: You must specify the disk names before you invoke the
-for-Fflag. If you specify the-for-F
flag, separate file system names to be monitored by commas.
Disk Input/Output History
To improve performance, the collection of disk input/output statistics is disabled by default. To enable the collection of this data, enter the following command: chdev -l sys0 -a iostat=true
To display the current settings, enter the following command: lsattr -E -l sys0 -a iostat
If the collection of disk input/output history is disabled and the iostat command is called without an interval, the iostat command output displays the message Disk History Since Boot Not Available instead of disk statistics.
플래그
| 플래그 | 설명 |
|---|---|
-a |
어댑터 처리량 보고를 보여 줍니다. -A와는 함께 쓸 수 있지만 -q·-Q와는 안 되고, -f·-F와도 함께 쓸 수 없습니다. |
-A |
기존(legacy) 비동기 입출력 사용률 보고를 보여 주고 TTY 사용률 보고를 끕니다. |
-b |
블록 I/O 장치 사용률 통계를 보여 줍니다. -T 말고는 다른 모든 플래그와 함께 쓸 수 없습니다. 6.1부터 |
-d |
TTY·CPU 사용률 보고를 끕니다. -d나 -p가 없으면 -d가 기본으로 켜집니다. -t와 -d를 함께 쓰면 디스크와 TTY·CPU 통계를 모두 끄며 -a나 -s와만 쓸 수 있습니다. -a나 -s 없이는 -t, -p와 함께 쓸 수 없습니다. |
-D |
확장 테이프·드라이브 사용률 보고를 보여 줍니다. -d나 -p와 함께 씁니다. -a나 -s 없이는 -t와 함께 쓸 수 없고, -f·-F와도 함께 쓸 수 없습니다. |
-f |
파일 시스템 사용률 보고를 보여 줍니다. -a, -D와 함께 쓸 수 없고, -A와는 쓸 수 있지만 -q·-Q와는 안 됩니다. 6.1부터 |
-F |
파일 시스템 사용률 보고를 보여 주고 다른 사용률 보고는 끕니다. 제약은 -f와 같습니다. 6.1부터 |
-l |
긴 목록 형식으로 출력합니다. |
-m |
경로 사용률 보고를 보여 줍니다. -t와 함께 쓸 수 없습니다. |
-p |
테이프 사용률 보고를 보여 줍니다. -a나 -s 없이는 -d와 함께 쓸 수 없습니다. Atape 장치만 보고합니다. |
-P |
POSIX 비동기 입출력 사용률 보고를 보여 주고 TTY 사용률 보고를 끕니다. |
-q |
AIO 큐와 그 요청 수를 지정합니다. -A나 -P와만 씁니다. |
-Q |
마운트된 모든 파일 시스템과 연결된 큐 번호, 요청 수를 보여 줍니다. -A나 -P와만 씁니다. |
-R |
min*·max* 값을 간격마다 다시 정합니다. 기본은 시작할 때 한 번만 다시 정합니다. -D와만 씁니다. |
-s |
시스템 처리량 보고를 지정합니다. WPAR 안에서는 -f나 -F와만 씁니다. |
-S power |
프로세서 통계(% user, % sys, % idle, % iowait, physc, entc)에 10의 power 제곱을 곱해 보여 줍니다. power는 0~3이며 기본은 0입니다. 0이 아니면 % user 등이 WPAR 기준이 아니라 시스템 전체 프로세서 소비 기준이 됩니다. 6.1부터 |
-t |
디스크 사용률 보고를 끕니다. -a나 -s 없이는 -d, -D와 함께 쓸 수 없고, -m과도 함께 쓸 수 없습니다. |
-T |
시각을 보여 줍니다. |
-V |
0이 아닌 유효한 통계만 보여 줍니다. 6.1부터 |
-z |
디스크 입출력 통계를 다시 0으로 둡니다. root만 쓸 수 있습니다. |
-@ |
WPAR의 입출력 활동을 보고합니다. -@ ALL은 전역 환경과 모든 WPAR, WPAR 이름 목록은 그 WPAR, -@ Global은 전역 환경만 보여 주며, WPAR 안에서 쓰면 시스템 전체와 WPAR 통계를 함께 보여 줍니다. -d, -D, -f, -F와만 함께 쓸 수 있고(-s, -T, -l 조합은 허용), -a, -t, -z, -A, -P, -q, -Q, -m과는 함께 쓸 수 없습니다. 6.1부터 |
영어 원문
-a— Displays the adapter throughput report. The-aflag can be specified with the-Aflag, but not when the-qor-Qflag is specified. The-aflag is mutually exclusive with the-for-Fflag.-A— Displays the legacy asynchronous IO utilization report, and turns off the display of TTY utilization report.-b— Displays the block I/O device utilization statistics. The-bflag is mutually exclusive to all flags, except the-Tflag.-d— Turns off the display of TTY utilization report or CPU utilization report. If you do not specify the-dor-pflag, then by default the-dflag is turned on. The-tand-dflags together turn off both disks and TTY or CPU statistics, allowed only with the-aor-sflags. The-dflag is mutually exclusive with the-tflag unless you specify the-aor-sflag, too. The-dflag is mutually exclusive with the-pflag unless you specify the-aor-sflag, too.-D— Displays the extended tape/drive utilization report. Use the-Dflag with the-dor-pflag. The-Dflag is mutually exclusive with the-tflag unless you specify the-aor-sflag, too. The-Dflag is mutually exclusive with the-for-Fflag.-f— Displays the file system utilization report. The-fflag is mutually exclusive with the-aor-Dflag. The-fflag can be specified with the-Aflag, but not when the-qor-Qflag is specified.-F— Displays the file system utilization report, and turns off other utilization reports. The-Fflag is mutually exclusive with the-aor-Dflag. The-Fflag can be specified with the-Aflag, but not when the-qor-Qflag is specified.-l— Displays the output in long listing mode.-m— Displays the path utilization report. The-mflag is mutually exclusive with the-tflag.-p— Displays the tape utilization report. The-pflag is mutually exclusive with the-dflag unless you specify the-aor-sflag, too. Note: Only the Atape device utilization is reported.-P— Displays the POSIX asynchronous IO utilization report, and turns off the display of TTY utilization report.-q— Specifies AIO queues and their request counts. The-qflag can be specified only with-Aor-Pflag.-Q— Displays a list of all the mounted file systems and the associated queue numbers with their request counts. The-Qflag can be specified only with-Aor-Pflag.-R— Specifies that the reset ofmin*andmax*values should happen at each interval. The default is to reset the values once when iostat is started. The-Rflag can be specified only with the-Dflag.-s— Specifies the system throughput report. You can specify the-aflag with the-Aflag, but not when you have specified the-qor-Qflag. Inside a workload partition, you can specify the-sflag only with the-for-Fflag.-Spower — Displays the processor statistics that are multiplied by a value of 10power. The default value of the power parameter is 0. The following fields are scaled: •% user•% sys•% idle•% iowait•physc•entcNote: By default, the%user,%sys,%idle, and%iowaitfields are relative to the processor consumption of a WPAR. When you specify the-Sflag with a nonzero power, the%user,%sys,%idle, and%iowaitfields are relative to system-wide processor consumption. Note: The value of power can only be between 0 and 3.-t— Turns off the display of disk utilization report. The-tand-dflags together turn off both disks and TTY or CPU statistics, allowed only with the-aor-sflags. The-tflag is mutually exclusive with the-dflag unless you specify the-aor-sflag, too. The-tflag is mutually exclusive with the-Dflag unless you specify the-aor-sflag, too. The-tflag is mutually exclusive with the-mflag.-T— Displays the time stamp.-V— Displays valid nonzero statistics.-z— Resets the disk input/output statistics. Only root users can use this option.-@— Reports I/O activities of a workload partition: • Specify-@ALL to display the activity for the global environment and all workload partitions in the system. • Specify the-@flag with a list of workload partition names to display the activity for that workload partition. • Specify-@Global to display the activity for the global environment only. • Specify the-@flag inside a WPAR to display system-wide statistics along with WPAR statistics. The-@flag can be specified only with –d and –D,-for-Fflags. All possible combinations of the-s, -T, -f, -F, -d, -Dand-lflags are allowed. Restriction: The-@flag is mutually exclusive with-a, -t, -z, -A, -P, -q, -Q, and the-mflag.
보안
RBAC 사용자와 Trusted AIX 사용자는 주의하세요. 이 명령은 특권 작업을 할 수 있으며, 특권 작업은 특권 사용자만 할 수 있습니다. 특권과 권한 목록은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다. 이 절은 6.1 문서에만 있습니다.
영어 원문
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
예제
| 명령 | 하는 일 |
|---|---|
iostat |
모든 TTY, CPU, 디스크의 부팅 뒤 기록 보고 한 번 |
iostat -d disk1 2 |
논리 이름 disk1의 디스크 보고를 2초 간격으로 계속 |
iostat disk1 2 6 |
disk1의 보고를 2초 간격으로 6번 |
iostat -d 2 6 |
모든 디스크의 보고를 2초 간격으로 6번 |
iostat disk1 disk2 disk3 2 6 |
디스크 세 개의 보고를 2초 간격으로 6번 |
iostat -s |
부팅 뒤 시스템 처리량 보고 |
iostat -a 5 |
5초 간격으로 어댑터 처리량 보고 |
iostat -sat 20 10 |
20초 간격으로 시스템·어댑터 처리량 보고 10번(디스크 보고 없이 TTY·CPU 보고만) |
iostat -sad hdisk0 hdisk7 30 |
30초마다 시스템·어댑터 처리량과 hdisk0·hdisk7의 디스크 사용률 |
iostat -T 60 |
출력 줄마다 시각을 붙여 60초 간격으로 |
iostat -A 2 6 |
2초 간격으로 AIO 보고 6번 |
iostat -A -Q |
마운트된 모든 파일 시스템의 큐에 대한 부팅 뒤 AIO 통계 |
iostat -D |
모든 디스크의 확장 드라이브 보고 |
iostat -Dp |
모든 테이프의 확장 드라이브 보고 |
iostat -D hdisk0 |
특정 디스크의 확장 드라이브 보고 |
iostat -z |
디스크 입출력 통계를 0으로 |
iostat -F -@ ALL |
모든 WPAR의 파일 시스템 통계만(6.1) |
iostat -f -s -@ ALL |
시스템과 모든 WPAR의 처리량(6.1) |
iostat -f |
기본 출력에 파일 시스템 통계를 붙여서(6.1) |
iostat -s -f |
논리·물리 시스템 처리량(6.1) |
iostat hdisk0 hdisk1 -f /dev/fslv00 /dev/fslv01 /dev/fslv02 |
지정한 드라이브와 파일 시스템의 처리량(6.1) |
iostat -S 1 |
프로세서 통계에 10을 곱해서(6.1) |
자주 쓰는 형태:
iostat -DlT 5 12
iostat -a 2 10
영어 원문
- To display a single history since boot report for all TTY, CPU, and Disks, enter the following command:
iostat
- To display a continuous disk report at two second intervals for the disk with the logical name
disk1, enter the following command:
iostat -d disk1 2
- To display six reports at two second intervals for the disk with the logical name
disk1, enter the following command:
iostat disk1 2 6
- To display six reports at two second intervals for all disks, enter the following command:
iostat -d 2 6
- To display six reports at two second intervals for three disks named
disk1,disk2,disk3, enter the following command:
iostat disk1 disk2 disk3 2 6
- To print the System throughput report since boot, enter the following command:
iostat -s
- To print the adapter throughput reports at 5-second intervals, enter the following command:
iostat -a 5
- To print 10 system and adapter throughput reports at 20-second intervals, with only the TTY and CPU report (no disk reports), enter the following command:
iostat -sat 20 10
- To print the system and adapter throughput reports with the disk utilization reports of hdisk0 and hdisk7 every 30 seconds, enter the following command:
iostat -sad hdisk0 hdisk7 30
- To display time stamp next to each line of output of iostat, enter the following command:
iostat -T 60
- To display 6 reports at 2-second intervals on AIO, enter the following command:
iostat -A 2 6
- To display AIO statistics since boot for queues associated with all mounted file systems, enter the following command:
iostat -A -Q
- To display extended drive report for all disks, enter the following command:
iostat -D
- To display extended drive report for all tapes, enter the following command:
iostat -Dp
- To display extended drive report for a specific disk, enter the following command:
iostat -D hdisk0
- To reset the disk input/output statistics, enter the following command:
iostat -z
- To display only file system statistics for all workload partitions, enter the following command:
iostat -F -@ ALL
- To display system throughput of all workload partitions along with the system, enter the following command:
iostat -f -s -@ ALL
- To display file system statistics that are appended with default O/P, enter the following command:
iostat -f
- To display logical and physical system throughput, enter the following command:
iostat -s -f
- To display throughput for user-specified drives and file systems, enter the following command:
iostat hdisk0 hdisk1 -f /dev/fslv00 /dev/fslv01 /dev/fslv02
- To display the processor statistics that are multiplied by a factor of 10, enter the following command:
iostat -S 1
파일
| 파일 | 설명 |
|---|---|
/usr/bin/iostat |
iostat 명령이 들어 있습니다. |
관련 명령어: vmstat, iostadd
영어 원문
- /usr/bin/iostat — Contains the iostat command.
Related information:
- vmstat command
- iostadd command
- Input and Output Handling Programmer's Overview
리눅스(GNU)와 다른 점
| 항목 | AIX 5.3·6.1 | 리눅스 iostat(sysstat) |
|---|---|---|
| 디스크 사용률 | % tm_act |
%util |
| 확장 보고 | -D(서비스 시간, avgwqsz, sqfull) |
-x(await, aqu-sz, r_await) |
| 어댑터·경로 | -a, -m |
없음 |
| 가상화 | physc, % entc |
%steal |
| 부팅 뒤 기록 | sys0의 iostat 속성을 켜야 함 |
늘 있음 |
AIX iostat -x는 없으므로 리눅스의 iostat -x 대신 iostat -D를 씁니다.