mpstat 명령어 (AIX 5.3·6.1)

핵심 정리

  • 시스템의 모든 논리 프로세서(SMT 스레드 포함)마다 성능 통계를 보여 줍니다. mpstat 2 5는 2초 간격으로 5번입니다.
  • 간격이 없으면 부팅 뒤 통계를 한 번 보여 줍니다. 간격마다 마지막에 ALL 줄(파티션 전체)이 붙고, 공유 파티션에서 할당 용량이 남으면 U 줄이 나옵니다.
  • 기본 열: min·maj(페이지 폴트), mpc, int, cs·ics, rq, mig, lpa, sysc, us·sy·wa·id, pc, %ec, lcs.
  • -d(친화성·이주·디스패치), -i(인터럽트), -s(SMT 스레드별 사용률), -h(pc와 기부·빼앗김), -a(모두), -w(넓게).
  • -a, -d, -i는 자동으로 넓은 출력입니다.
  • 6.1에서 -@ wparname(WPAR), -O, -X(XML)가 생겼습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 -@, -O, -X·-o, WPAR의 rset과 * 표시, 일부 친화성 열이 더해짐)
원문 IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3
파일 /usr/bin/mpstat
관련 명령어 lparstat, sar -P ALL, vmstat, iostat

목적

시스템의 모든 논리 프로세서에 대한 성능 통계를 모아 보여 줍니다.

영어 원문

Collects and displays performance statistics for all logical processors in the system.

구문

text
mpstat [ { -d | -i | -s | -a | -h } ] [ -w ] [ -O Options ] [ -@ wparname ] [ interval [ count ] ]
mpstat [ -X [ -o filename ] ] [ interval [ count ] ]

5.3 구문은 mpstat [ { -d | -i | -s | -a | -h } ] [ -w ] [ interval [ count ] ]입니다. 원문은 wparname이 "WPAR 안에서는 쓸 수 없다"고 적습니다.

설명

mpstat 명령은 시스템의 모든 논리 프로세서에 대해 성능 통계를 모아 보여 줍니다. 통계를 보여 줄 횟수와 데이터를 갱신할 간격을 정할 수 있습니다.

  • interval은 보고 사이의 초입니다. 없으면 시스템 시작 뒤의 통계로 보고서 하나를 만들고 끝납니다. count는 interval과 함께만 쓰며, interval만 주면 계속 보고합니다. count에 0은 쓰지 않습니다.
  • 처음에는 시스템 구성을 보여 주며, 구성이 바뀌면 다시 보여 줍니다. 다음으로 사용률 통계를 간격마다 이전 간격과의 차이로 보여 줍니다.

시스템 구성 항목: lcpu(온라인 논리 프로세서 수), ent(할당 처리 용량, 공유일 때만), mode(capped·uncapped. 전용 LPAR은 capped나 donating), rset(WPAR에 연결된 자원 집합 형식, regular·exclusive)(6.1).

통계 열

열 플래그 뜻
cpu 모두 논리 프로세서 ID. (6.1) WPAR 안에서 -s나 -@로 실행하면 WPAR 자원 집합의 프로세서 앞에 *
min 기본, -a 작은 페이지 폴트(입출력 없음)
maj 기본, -a 큰 페이지 폴트(디스크 입출력 있음)
mpcs, mpcr -a, -i mpc 송신·수신 인터럽트 수
mpc 기본만 프로세서 사이 호출의 합
dev -a, -i 장치 인터럽트 수
soft -a, -i 소프트웨어 인터럽트 수
dec -a, -i decrementer 인터럽트 수
ph -a, -i phantom 인터럽트 수
int 기본만 인터럽트의 합
cs 기본, -a 문맥 교환의 합
ics 기본, -a 비자발적 문맥 교환의 합
bound -a, -d 묶인(bound) 스레드 수
rq 기본, -a, -d 실행 큐 크기
push -a, -d 굶주림 부하 분산으로 인한 이주 수
S3pull -a, -d 유휴 빼앗기로 스케줄링 친화성 도메인 3 밖으로 이주한 수
S3grd -a, -d 친화성 도메인 3 밖의 전역 실행 큐에서 디스패치한 수
mig 기본만 다른 논리 프로세서로 이주한 스레드 수의 합
S0rd -a, -d 같은 논리 CPU 안(도메인 0)에서 다시 디스패치한 비율
S1rd -a, -d 같은 물리 프로세서·코어 안(도메인 1)에서 다시 디스패치한 비율
S2rd -a, -d 같은 칩 세트 안, 다른 코어(도메인 2)에서 다시 디스패치한 비율
S3rd -a, -d 같은 MCM 안, 다른 칩 세트(도메인 3)에서 다시 디스패치한 비율
S4rd -a, -d 같은 CEC·Plane 안, 다른 MCM(도메인 4)에서 다시 디스패치한 비율
S5rd -a, -d 다른 CEC·Plane(도메인 5)에서 다시 디스패치한 비율
S3hrd, S4hrd, S5hrd -a, -d 이 논리 프로세서에서의 로컬·가까운·먼 스레드 디스패치 비율
lpa 기본만 논리 프로세서 친화성. 친화성 도메인 3 안에서 다시 디스패치한 비율
sysc 기본, -a 시스템 호출 수
us, sy 기본, -a 사용자·시스템 수준에서 실행한 물리 프로세서 사용률
wa 기본, -a 남은 디스크 입출력이 있는 동안 유휴였던 시간 비율
id 기본, -a 남은 디스크 입출력 없이 유휴였던 시간 비율
pc 기본, -a, -h 소비한 물리 프로세서 수(또는 일부). 전용 파티션의 기본 출력에서는 기부와 SMT가 둘 다 꺼져 있으면 나오지 않음. U 줄의 pc는 쓰지 않은 물리 프로세서 수
%ec 기본, -a 논리 프로세서가 소비한 할당 용량 비율. ALL 줄은 파티션 전체. 공유 파티션에서만, 짧은 간격에서는 100%를 넘을 수 있음
ilcs, vlcs -a, -d, -h 비자발적·자발적 논리 프로세서 문맥 교환 수. 공유 파티션에서(-h, -a는 전용에서도)
lcs 기본 논리 프로세서 문맥 교환의 합. 공유 파티션이나 기부하는 전용 파티션에서
%idon, %bdon -a, -h 유휴·바쁜 사이클을 기부하는 동안의 물리 프로세서 사용률. 기부하는 전용 파티션에서
%istol, %bstol -a, -h 하이퍼바이저가 유휴·바쁜 사이클을 빼앗는 동안의 사용률. 전용 파티션에서
%nsp -a, -d 현재 평균 프로세서 속도(공칭 대비 %). SPURR을 쓰는 하드웨어에서만
  • 공유 파티션에서 할당 처리 용량을 다 쓰지 않으면 cpuid U 줄이 나올 수 있습니다.
  • cpuid ALL 줄은 파티션 전체 사용률이며, 할당 용량보다 많이 쓰는 uncapped 파티션을 빼면 할당 처리 용량에 대한 비율입니다. 전용 파티션의 할당 처리 용량은 물리 프로세서 수입니다.
  • -s를 주면 SMT가 켜져 있을 때 가상 프로세서 엔진의 사용률과, 그에 딸린 스레드(논리 프로세서)마다의 사용률을 보고합니다. 전용 파티션에서는 스레드 사용률만 보여 줍니다.
  • 간격 모드에서는 초당 평균값입니다.
영어 원문

The mpstat command collects and displays performance statistics for all logical processors in the system. Users can define both, the number of times the statistics are displayed, and the interval at which the data is updated.

The interval parameter specifies the amount of time in seconds between each report. If you do not specify the interval parameter, the mpstat command generates a single report that contains statistics for the time since system startup and then exits. You can specify the count parameter only with the interval parameter. If you specify the count parameter, its value determines the number of reports that are generated and the number of seconds apart. If you specify the interval parameter without the count parameter, reports are continuously generated. Do not specify a value of zero to the count parameter.

The mpstat command with no options generates a single report that contains the performance statistics for all logical processors since boot time.

When the mpstat command is invoked, it displays two sections of statistics. The first section displays the System Configuration, which is displayed when the command starts and whenever there is a change in the system configuration. The second section displays the Utilization Statistics which are displayed in intervals and at any time the values of these metrics are deltas from previous interval.

The following information is displayed in the system configuration section: lcpu Indicates the number of online logical processors.

ent Indicates the entitled processing capacity in processor units. This information is displayed only when the partition type is shared.

mode Indicates whether the partition processor capacity is capped or uncapped allowing it to consume idle cycles from the shared pool. Dedicated LPAR is capped or donating.

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 performance statistics displayed by mpstat are listed below:

CPU (All flags) Logical processor ID.

Note: The logical processor ID that is associated with the resource set of a WPAR is prefixed by an asterisk (*) when you run the mpstat command inside a WPAR with the -s or -@ flag.

min (Default, -a flag) Minor page faults (page faults with no IO).

maj (Default, -a flag) Major page faults (page faults with disk IO).

mpcs (-a, -i flag) Number of mpc send interrupts.

mpcr (-a, -i flag) Number of mpc receive interrupts.

mpc (Only default) Total number of inter-processor calls .

dev (-a, -i flag) Number of device interrupts.

soft (-a, -i flag) Number of software interrupts.

dec (-a, -i flag) Number of decrementer interrupts.

ph (-a, -i flag) Number of phantom interrupts.

int (Only default) Total number of interrupts.

cs (Default, -a flag) Total number of context switches.

ics (Default, -a flag) Total number of involuntary context switches.

bound (-a, -d flag) Total number of threads that are bound.

rq (Default, -a, -d flag) Run queue size.

push (-a, -d flag) Number of migrations due to starvation load balancing .

S3pull (-a, -d flag) Number of migrations outside the scheduling affinity domain 3 due to idle stealing.

S3grd (-a, -d flag) Number of dispatches from global runqueue, outside the scheduling affinity domain 3.

mig (Only default) Total number of thread migrations (to another logical processor).

S0rd (-a, -d flag) The percentage of thread redispatches within the same logical CPU with the scheduling affinity domain 0.

S1rd (-a, -d flag) The percentage of thread redispatches within the same physical processor or core with the scheduling affinity domain 1.

S2rd (-a, -d flag) The percentage of thread redispatches within the same chip set, but not within the same processor core with the scheduling affinity domain 2.

S3rd (-a, -d flag) The percentage of thread redispatches within the same MCM (multiple chip module), but not within the same chip set with the scheduling affinity domain 3. S4rd (-a, -d flag) The percentage of thread redispatches on different MCMs within the same CEC or Plane with scheduling affinity domain 4. S5rd (-a, -d flag) The percentage of thread redispatches on a different CEC or Plane with scheduling affinity domain 5.

S3hrd (-a, -d flag) The percentage of local thread dispatches on this logical processor.

S4hrd (-a, -d flag) The percentage of near thread dispatches on this logical processor.

S5hrd (-a, -d flag) The percentage of far thread dispatches on this logical processor.

lpa (Only default) Logical processor affinity. The percentage of logical processor re-dispatches within the scheduling affinity domain 3.

sysc (Default, -a flag) Number of system calls.

us (Default, -a flag) The percentage of physical processor utilization that occurred while executing at the user level (application).

sy (Default, -a flag) The percentage of physical processor utilization that occurred while executing at the system level (kernel).

wa (Default, -a flag) The percentage of time that the logical processor was idle during which it had an outstanding disk I/O request.

id (Default, -a flag) The percentage of time that the logical processor was idle and it did not have an outstanding disk I/O request.

pc (Default, -a flag, -h flag) The number or fraction of physical processor consumed. It is displayed in both a shared partition and a dedicated partition. For the default flag in the dedicated partition, it is not displayed when both donation and simultaneous multithreading are disabled.

The pc of the cpuid U row represents the number of unused physical processors.

%ec (Default, -a flag) The percentage of entitled capacity consumed by the logical processor. The %ec of the ALL CPU row represents the percentage of entitled capacity consumed. 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. The attribute is displayed only in a shared partition.

ilcs (-a, -d, -h flag) Number of involuntary logical processor context switches, displayed only in shared partition. For the -h and -a flags, it is also displayed in dedicated partition.

vlcs (-a, -d, -h flag) Number of voluntary logical processor context switches. Displayed only in shared partition. For the -h and -a flags, it is also displayed in dedicated partition.

lcs (Default) Total number of logical processor context switches. Displayed only in shared partition or when a dedicated partition is donating.

%idon (-a, -h flag) Shows the percentage of physical processor utilization that occurs while explicitly donating idle cycles. Displayed only in dedicated partition that is donating.

%bdon (-a, -h flag) Shows the percentage of physical processor utilization that occurs while donating busy cycles. Displayed only in dedicated partition that is donating.

%istol (-a, -h flag) Shows the percentage of physical processor utilization that occurs while the Hypervisor is stealing idle cycles. Displayed only in dedicated partition.

%bstol (-a, -h flag) Shows the percentage of physical processor utilization that occurs while the Hypervisor is stealing busy cycles. Displayed only in dedicated partition.

%nsp (-a, -d flag) Shows the current average processor speed as a percentage of nominal speed. Displayed only if the hardware uses SPURR.

The mpstat command displays all the above statistics for every logical processor in the partition. When running a shared partition, a special processor row with the cpuid U can be displayed when the entitled processing capacity has not entirely been consumed.

The mpstat command also displays a special processor row with the cpuid ALL which shows the partition-wide utilization. On that row, except for uncapped partitions with current physical processor consumption above their entitled capacity, the percentages are relative to the entitled processing capacity. For dedicated partitions, the entitled processing capacity is the number of physical processors. And for a WPAR , the processors present in the associated resource set, if any, are indicated by asterisks (*) only when the -s or -@ flag is used.

When the -s flag is specified, the mpstat command reports simultaneous multithreading utilization, if it is enabled. This report displays the virtual processor engines utilization and utilization of each thread (logical processor) associated with the virtual processor engine.

If mpstat is running in a dedicated partition and simultaneous multithreading is enabled, then only the thread (logical processor) utilization is displayed.

If mpstat is running on an interval based mode, then it would be average value calculated per second.

플래그

플래그 설명
-a 모든 통계를 보여 줍니다.
-d AIX 스레드의 친화성·이주 통계와 논리 프로세서의 디스패치 통계를 자세히 보여 줍니다.
-i 인터럽트 통계를 자세히 보여 줍니다.
-s SMT 스레드 사용률을 보여 줍니다. SMT가 켜진 파티션에서만 씁니다.
-h pc와 프로세서 전환을, 전용 파티션이면 빼앗김·기부 통계와 함께 보여 줍니다.
-w 넓은 열로 출력합니다. 기본은 80열입니다.
-@ wparname 지정한 WPAR의 통계를 보여 줍니다. 6.1부터

참고:

  1. -a, -d, -i는 자동으로 넓은 열 출력을 켭니다.
  2. (6.1) WPAR 안에서 -@는 모든 프로세서의 통계를 보고하며, WPAR 안에서 보이는 프로세서 통계는 늘 시스템 전체 값입니다.
  3. (6.1) -X와 함께 쓸 수 있는 것은 -o뿐입니다.
영어 원문
  • -a — Displays all the statistics.
  • -d — Displays detailed affinity and migration statistics for AIX threads and dispatching statistics for logical processors.
  • -i — Displays detailed interrupts statistics.
  • -s — Displays simultaneous multithreading threads utilization, this flag is available only when mpstat runs in a simultaneous multithreading enabled partition.
  • -h — Displays pc and processor switches, with stolen and donation statistics for dedicated partitions.
  • -w — Displays wide column output, switches to wide output mode. Default is 80 column output mode.
  • @ wparname — Displays the statistics for the specified WPAR.
  • Note:
  1. The -a, -d, and -i flags implicitly turn on wide-column output.

  2. Inside a WPAR, the -@ flag reports statistics of all processors.

  3. Processor statistics that are displayed inside a WPAR is always system wide.

  4. Only -o option is allowed with -X option.

매개변수

매개변수 설명
interval 반복 사이의 간격입니다. 없으면 시스템이 켜진 뒤의 값을 한 번 보여 줍니다. 있으면 그만큼 기다린 뒤 첫 데이터를 출력하며, 데이터마다 구분선, 열마다 평균값을 담은 줄(cpu 자리는 ALL), 빈 줄이 이어집니다.
count 반복 횟수입니다. interval만 주면 끝없이 돌며, interval 없이 count만 줄 수는 없습니다.
영어 원문
  • interval — Specifies the interval between the iterations. If interval is not specified, just one snapshot of metrics is displayed which actually reports the values from the time system is up. If interval is specified, the tool waits for that duration before printing the first set of data. Each set of data is followed by a separation line, a line with average values for each columns (except the processor, which is replaced by ALL), followed by an empty line.
  • count — Specifies number of iterations. If interval is specified and count is not specified then mpstat runs infinitely. count can not be specified without specifying interval.

예제

명령 하는 일
mpstat 1 1 기본 사용률 지표
mpstat -w 1 1 기본 지표를 넓은 화면으로
mpstat -d 1 1 디스패치와 친화성 지표 상세
mpstat -i 1 1 인터럽트 보고 상세
mpstat -a 1 1 모든 통계
mpstat -s 1 1 SMT 사용률
mpstat -@ wparname WPAR의 모든 프로세서 지표(6.1)
mpstat -@ WPAR 안에서 그 WPAR의 모든 프로세서 지표(6.1)
영어 원문
  1. To see the default set of utilization metrics, enter the following command:
mpstat 1 1
  1. To see the default set of utilization metrics in wide display mode, enter the following command:
mpstat -w 1 1
  1. To see the detailed dispatch & affinity metrics, enter the following command:
mpstat -d 1 1
  1. To see the detailed interrupts report, enter the following command:
mpstat -i 1 1
  1. To see all the statistics, enter the following command:
mpstat -a 1 1
  1. To see simultaneous multithreading utilization, enter the following command:
mpstat -s 1 1
  1. To see all the processor metrics of a WPAR, enter the following command:
mpstat -@ wparname

Note: To see all the processor metrics of a WPAR inside the WPAR, enter the following command:

mpstat -@

파일

파일 설명
/usr/bin/mpstat mpstat 명령이 들어 있습니다.

관련 명령어: lparstat, iostat, vmstat, sar

영어 원문
  • /usr/bin/mpstat — Contains the mpstat command.

Related reference:

  • lparstat Command
  • iostat Command

Related information:

  • vmstat command
  • sar command

리눅스(GNU)와 다른 점

항목 AIX 5.3·6.1 리눅스 mpstat(sysstat)
프로세서 고르기 늘 모든 논리 프로세서와 ALL -P ALL이나 -P 0,1로 고름(기본은 전체 평균만)
열 페이지 폴트, 친화성(S0rd~S5rd), pc, %ec %usr, %nice, %sys, %iowait, %irq, %soft, %steal, %idle
SMT -s로 가상 프로세서와 스레드별 없음

리눅스 습관대로 mpstat -P ALL을 입력하면 AIX에서는 플래그 오류가 납니다.