vmstat 명령어 (AIX 5.3·6.1)

핵심 정리

  • 커널 스레드, 가상 메모리, 페이징, 트랩, 디스크, 프로세서 활동 통계를 보고합니다. vmstat 2 5는 2초 간격으로 5번 보고합니다.
  • 간격 없이 실행하면 시스템 시작 뒤의 요약 한 번만 보여 줍니다. 첫 줄은 늘 부팅 뒤 평균입니다.
  • 주요 열: r(실행 대기 스레드), b(VMM 대기), avm(활성 가상 페이지), fre(빈 페이지), pi·po(페이징 공간 입출력), sr(스캔), us·sy·id·wa(CPU %), pc·ec(공유 프로세서 LPAR).
  • -v(VMM 통계: numperm, maxperm, fsbuf 부족 등), -s(부팅 뒤 누적 이벤트), -I(I/O 관점, p·fi·fo 열), -t(시각), -w(넓게), -p·-P(페이지 크기별), -l(대형 페이지), -i(장치별 인터럽트).
  • 6.1에서 -@(WPAR), -c(AME 메모리 압축), -h(하이퍼바이저 페이지), -S(프로세서 값 배율), -W(-I와 함께 w 열)가 생겼습니다.
  • 페이지 하나는 4096바이트입니다. 큰 부분이 파일 캐시로 쓰이므로 fre가 작게 유지되는 것은 흔한 일입니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 -@, -c, -h, -S, -W와 그 열·통계, 예제 14~23이 더해짐)
원문 IBM Commands Reference — 5.3 Volume 6, 6.1 Volume 6
파일 /usr/bin/vmstat
관련 명령어 vmo, iostat, sar, topas, svmon

목적

가상 메모리 통계를 보고합니다.

영어 원문

Reports virtual memory statistics.

구문

text
vmstat [ -f ] [ -i ] [ -s ] [ -I [ -W ] ] [ -t ] [ -v ] [ -h ] [ -w ] [ -l ] [ -c ] [ -@ wparname | ALL ]
       [ { -p | -P } pagesize | ALL ] [ -S power ] [ PhysicalVolume ... ] [ Interval [ Count ] ]

-W, -h, -c, -@, -S는 6.1 구문에만 있습니다. 워크로드 파티션 안에서는 wparname과 -i를 함께 쓰지 않습니다.

설명

vmstat 명령은 커널 스레드, 가상 메모리, 디스크, 하이퍼바이저 페이지(6.1), 트랩, 프로세서 활동에 대한 통계를 보고합니다. 이 보고로 시스템 부하를 고르게 맞출 수 있습니다. 시스템 전체(모든 프로세서) 통계는 백분율 값은 평균으로, 그 밖에는 합으로 계산합니다. 통계를 한 번에(원자적으로) 읽지 않으므로 값이 서로 맞지 않을 수 있습니다.

  • 플래그 없이 실행하면 시스템 시작 뒤의 가상 메모리 활동 요약을 보고합니다. -f를 주면 시스템 시작 뒤의 fork 수를 보고합니다. PhysicalVolume 매개변수는 물리 볼륨의 이름입니다.
  • Interval 매개변수는 보고 사이의 초입니다. Interval을 주지 않으면 시스템 시작 뒤의 통계를 담은 보고 하나를 만들고 끝납니다. Count는 Interval과 함께만 쓸 수 있으며, 보고 횟수를 정합니다. Interval만 주면 계속 보고합니다. Count에 0은 쓰지 않습니다.
  • 커널은 스레드, 페이징, 인터럽트 통계를 유지하며 vmstat은 perfstat 커널 확장으로 읽습니다. 디스크 입출력 통계는 장치 드라이버가 유지합니다. 디스크의 평균 전송률은 활성 시간과 전송 횟수로 정하며, 활성 시간 비율은 보고 기간 동안 드라이브가 바빴던 시간으로 계산합니다.
  • Micro-Partitioning 환경에서는 소비한 물리 프로세서 수(pc)와 소비한 할당 용량 비율(ec)을 보고합니다.
  • 실행 중에 출력에 영향을 주는 시스템 구성이 바뀌면 경고 메시지를 출력하고, 바뀐 구성 정보와 머리글을 다시 출력한 뒤 계속합니다.

시스템 구성 줄

보고에는 시스템 구성 줄과 열 머리가 있습니다. -@를 주면 시스템 구성과 WPAR 구성이 함께 나옵니다.

항목 뜻
lcpu 논리 프로세서 수
mem 메모리 양
tmem LPAR의 실제 메모리 크기. -c를 주고 AME(Active Memory Expansion)가 켜져 있을 때만
ent 할당 용량. 공유 프로세서로 돌 때만
drives 디스크 수. 물리 볼륨 이름을 감시할 때만
WPARs 활성 워크로드 파티션 수. -@일 때만
memlim WPAR의 메모리 자원 한도(MB). 메모리 한도를 강제한 WPAR만
cpulim WPAR의 프로세서 자원 한도(프로세서 단위). 프로세서 한도를 강제한 WPAR만
rset WPAR에 연결된 rset 레지스트리 형식(regular 또는 exclusive)
mmode 메모리 모드. AMS(Active Memory Sharing)가 켜져 있거나 -c일 때
mpsz 메모리 풀 크기(GB). 공유 메모리 모드일 때만

열 머리

묶음 열 뜻
WPAR WPAR 워크로드 파티션 이름(-@일 때). System은 시스템 전체, Global은 전역 환경만의 통계
kthr r 표본 기간 동안 실행할 수 있는 커널 스레드의 평균 수(실행을 기다리는 것과 실행 중인 것)
kthr b VMM 대기 큐(자원·입출력 대기)에 있는 커널 스레드의 평균 수
memory avm 활성 가상 페이지(페이지 하나는 4096바이트)
memory fre 빈 목록의 크기. 실제 메모리의 큰 부분이 파일 시스템 캐시로 쓰이므로 작게 유지되는 것이 흔합니다.
page re 페이저 입출력 목록
page pi 페이징 공간에서 들어온 페이지
page po 페이징 공간으로 나간 페이지
page fr 해제한 페이지(페이지 교체)
page sr 페이지 교체 알고리즘이 스캔한 페이지
page cy 페이지 교체 알고리즘의 클록 순환
faults in 장치 인터럽트
faults sy 시스템 호출
faults cs 커널 스레드 문맥 교환
cpu us 사용자 시간
cpu sy 시스템 시간
cpu id 프로세서 유휴 시간
cpu wa 디스크·NFS 입출력 요청이 남아 있는 동안의 유휴 시간
cpu pc 사용한 물리 프로세서 수. 공유 프로세서일 때만
cpu ec 소비한 할당 용량의 비율. 공유 프로세서일 때만. 짧은 간격에서는 100%를 넘을 수 있습니다.
cpu rc 사용한 프로세서 자원 비율. 프로세서 한도를 강제한 WPAR만
disk 물리 볼륨 이름 표본 기간 동안 지정한 물리 볼륨(1~4개)에 대한 초당 전송 수. 물리 장치에 대한 요청 수이며 데이터 양은 아닙니다.
  • page와 faults는 표본 기간의 초당 평균입니다.
  • 상한 없는(uncapped) 파티션의 물리 프로세서 소비가 할당 용량을 넘으면 us, sy, id, wa는 pc에 대한 비율이 됩니다.
  • (6.1) -@ ALL에서 WPAR 값이 없는 지표는 -로, -@ wparname이나 WPAR 안에서 WPAR 값이 없는 지표는 @를 붙여 시스템 전체 값으로 보여 줍니다. 지원하지 않는 지표는 -입니다.

플래그에 따라 바뀌는 열

플래그 바뀌는 것
-I kthr에 p(raw 장치의 입출력 메시지를 기다리는 스레드의 평균 수) 열이 더해지고, page의 re·cy 대신 fi(초당 파일 페이지 인)·fo(초당 파일 페이지 아웃) 열이 나옵니다.
-I -W kthr에 w 열이 더해집니다. 초당 파일 시스템 직접 입출력 이벤트(AIO, 버퍼 캐시, CIO, 직접 입출력, NFS, VMM 대기 목록)를 기다리는 스레드 수입니다(6.1).
-c memory에 csz(압축 풀 크기), cfr(압축 풀의 빈 페이지), dxm(확장 메모리 크기 부족분)이 더해지고(4K 페이지 단위), page의 re·cy 대신 ci(압축 풀에서 초당 페이지 인)·co(압축 풀로 초당 페이지 아웃)가 나옵니다(6.1).
-l large-page 절에 alp(사용 중인 대형 페이지 수)와 flp(대형 페이지 빈 목록의 수)가 나옵니다.
-p 지정한 페이지 크기의 VMM 통계 줄(avm, fre, re, fi, fo, pi, po, ci, co, fr, sr, cy)이 더해지며, 앞에 psz(페이지 크기), 뒤에 siz(그 크기의 프레임 수)가 붙습니다. -s와 함께 쓰면 페이지 크기 머리글이 붙은 별도 절이 나옵니다.
-P 지정한 페이지 크기에 대해 pgsz, memory(siz, avm, fre), page(re, pi, po, fr, sr, cy, fi, fo, ci, co)만 보고합니다.

참고: re, fi, fo, cy의 표시는 -I의, re, ci, co, cy의 표시는 -c의 영향을 받습니다. 자원 제어가 없으면 avm과 fre는 시스템 전체 값이라 -@에서는 @가 붙습니다.

영어 원문

The vmstat command reports statistics about kernel threads, virtual memory, disks, hypervisor pages, traps, and processor activity. Reports that are generated by the vmstat command can be used to balance system load activity. These system-wide statistics (among all processors) are calculated as averages for values that are expressed as percentages, and as sums otherwise. The vmstat command might return inconsistent statistics because the statistics are not read atomically.

If you run the vmstat command without flags, the report contains a summary of the virtual memory activity since system startup. If you specify the -f flag, the vmstat command reports the number of forks since system startup. The physicalvolume parameter specifies the name of the physical volume.

The interval parameter specifies the amount of time in seconds between each report. If you do not specify the interval parameter, the vmstat 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 kernel maintains statistics for kernel threads, paging, and interrupt activity, which the vmstat command accesses by using the perfstat kernel extension. The disk input/output statistics are maintained by device drivers. For disks, the average transfer rate is determined by using the active time and number of times information is being transferred. The percent active time is computed from the amount of time the drive is busy during the report.

The vmstat command reports the number of physical processors consumed (pc), and the percentage of entitlement consumed (ec), in Micro-Partitioning® environments. These metrics display on the Micro-Partitioning environments.

The report that is generated by the vmstat command contains a system configuration row and column headings. If the -@ flag is specified, the report consists of system configuration and WPAR configuration. The system configuration row has the following values:

lcpu Indicates the number of logical processors.

mem Indicates the amount of memory.

tmem Indicates the true memory size of the LPAR.

Note: This flag is available only when -c option is provided and Active Memory™Expansion is enabled.

ent Indicates the entitled capacity. Displays only when the partition is running with shared processor. drives Indicates the number of disks. Displays only when physical volume name is monitored.

WPARs Indicates the number of active workload partitions. It is displayed only when the -@ flag is specified.

memlim Indicates the limit of the memory resource of the workload partition. The limit is in megabytes (MB). This information is displayed only for the WPAR with enforced memory resource limit.

cpulim Indicates the limit of processor resource of the workload partition in processor units. This information is displayed only for the WPAR with enforced processor resource limit.

rset Indicates the type of the rset registry that is associated with a WPAR. The type can be regular or exclusive. This information is displayed only for the WPARs that are associated with a rset registry.

mmode Indicates memory mode. This metric is displayed automatically in a system with Active Memory Sharing enabled. This metric is also displayed when -c option is used.

mpsz Size of the memory pool in gigabytes. This metric is displayed only in shared-memory mode.

The column headings and their descriptions follow:

WPAR: Information about workload partitions. It displays only when the-@ flag is specified.

WPAR Workload partition name.

Notes:

  1. The system WPAR name indicates system-wide statistics. The global WPAR name indicates the statistics belong to Global only.

  2. When the vmstat command is started with the -@ ALL option and the WPAR specific information is not available for a metric, then an en dash sign (-) is displayed instead of a value.

  3. When the vmstat command is started with the -@ wparname or started inside a WPAR, if the WPAR information is not available for a metric, then that metric is marked with the at sign (@), and the system-wide value is displayed for that metric.

  4. If a metric is not supported, then a en dash sign (-) is displayed instead of a value.

kthr: Information about kernel thread states.

r Average number of runnable kernel threads over the sampling interval. Runnable threads consist of the threads that are ready but still waiting to run, and the threads that are already running.

b Average number of kernel threads that are placed in the Virtual Memory Manager (VMM) wait queue (awaiting resource, awaiting input/output) over the sampling interval.

Memory: Information about the usage of virtual and real memory. Virtual pages are considered active if they are accessed. A page is 4096 bytes.

avm Active virtual pages.

fre Size of the free list.

Note: A large portion of real memory is used as a cache for file system data. It is not unusual for the size of the free list to remain small.

Page: Information about page faults and paging activity. This information is averaged over the interval and given in units per second. re Pager input/output list.

pi Pages that are paged in from paging space.

po Pages paged out to paging space.

fr Pages freed (page replacement).

sr Pages that are scanned by page-replacement algorithm.

cy Clock cycles by page-replacement algorithm.

Faults: Trap and interrupt rate averages per second over the sampling interval.

in Device interrupts.

sy System calls.

cs Kernel thread context switches.

CPU: Breakdown of percentage usage of processor time.

us User time.

If the current physical processor consumption of the uncapped partitions exceeds the entitled capacity, the percentage becomes relative to the number of physical processor consumed (pc).

sy System time.

If the current physical processor consumption of the uncapped partitions exceeds the entitled capacity, the percentage becomes relative to the number of physical processor consumed (pc).

id Processor idle time.

If the current physical processor consumption of the uncapped partitions exceeds the entitled capacity, the percentage becomes relative to the number of physical processor consumed (pc).

wa Processor idle time during which the system had outstanding disk/NFS I/O request.

If the current physical processor consumption of the uncapped partitions exceeds the entitled capacity, the percentage becomes relative to the number of physical processor consumed (pc).

pc Number of physical processors used. Displayed only if the partition is running with shared processor.

ec The percentage of entitled capacity that is consumed. 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 The percentage of processor resource that is used. This information is displayed only for the WPARs with enforced processor resource limit.

Disk: Provides the number of transfers per second to the specified physical volumes that occurred in the sample interval. Thephysicalvolume parameter can be used to specify one to four names. Transfer statistics are given for each specified drive in the order specified. This count represents requests to the physical device. It does not imply an amount of data that was read or written. Several logical requests can be combined into one physical request. If the physicalvolume parameter is used, the physical volume names are printed at the beginning of command execution.

If the -I flag is specified, an I/O oriented view is presented with the following column changes.

kthr The p column is displayed in addition to the r and b columns.

p Average number of threads waiting for I/O messages from raw devices. Raw devices are those devices that are directly attached to the system. If the -W flag is specified along with the -I flag, an additional w column is also displayed along with the r, b, and p flags.

w Number of threads per second of time that are waiting for the file system direct I/O event to occur. These events include the following types:

  • Asynchronous I/O (AIO)

  • Buffer cache subsystem

  • Concurrent I/O (CIO)

  • File system direct I/O

  • NFS subsystem

  • A thread is waiting for an action from the virtual memory manager (VMM) waiting list.

page New fi and fo columns are displayed instead of the re and cy columns.

fi File page-ins per second.

fo File page-outs per second.

If the -c flag is specified, Active Memory Expansion view is presented with the following column changes.

memory The columns csz, cfr, and dxm are displayed besides columns avm and fre.

csz Current compressed pool size, in 4K page units.

cfr Free pages available in compressed pool, in 4K page units.

dxm Deficit in Expanded Memory Size, in 4K page units.

page New columns ci and co are displayed instead of re and cy columns.

ci Number of page-ins per second from compressed pool.

co Number of page-outs per second to compressed pool.

If while the vmstat command is running, there is a change in system configuration that affects the output, vmstat prints a warning message about the configuration change. It then continues the output after printing the updated system configuration information and the header.

If the -l flag is specified, an additional "large-page" section is displayed with the following columns:

alp Indicates the number of large pages currently in use.

flp Indicates the number of large pages on the large page freelist.

If the -p option is specified, additional lines of VMM statistics are displayed for the specified page sizes. With -I and -t options, the -p option produces an additional line for the specified page size. This line contains the following VMM statistics relevant to the specified page size:

  • avm

  • fre

  • re

  • fi

  • fo

  • pi

  • po

  • ci

  • co

  • fr

  • sr

  • cy

Notes:

  1. The display of the re, fi, fo, and cy options are affected by the -I option.

  2. The display of the re, ci, co, and cy options are affected by the -c option.

  3. If there is no resource control, then the avm and fre options are system-wide. Therefore, with the -@ option set, both the avm and fre options will be marked with the at sign (@).

These VMM statistics are preceded by a psz column and followed by an siz column. The description of these two columns follows:

psz Page size (for example, 4 KB, 64 KB).

siz Number of frames of the specified page size that exist on the system.

With the -s option, the -p option produces a separate stanza of output that contains only the statistics relevant to the specified page size. This additional stanza is preceded by a page size header.

The -P option produces the following report for the specified page size:

pgsz Indicates the page size (for example, 4 KB, 64 KB).

Memory Indicates the memory statistics for the specified page sizes.

siz The number of frames of the specified page size that exist on the system.

avm Active virtual pages applicable to the specified page size.

fre Size of the free list for the specified page size.

Page Indicates the relevant page faults and paging activity for the specified page size. The page-related columns re, pi, po, fr, sr, cy, fi, fo, ci, and co are also applicable to this report.

플래그

참고: -f(또는 -s)를 지정하면 그 플래그만 받고 다른 플래그는 무시합니다. -f와 -s를 둘 다 지정하면 첫째만 받습니다.

플래그 설명
-@ wparname 워크로드 파티션의 가상 메모리 활동을 보고합니다. -@ ALL은 시스템과 전역 환경, 모든 WPAR을, -@ wparname은 그 WPAR만 보고합니다. WPAR 안에서 -@를 주면 시스템 전체와 WPAR 통계를 보여 주며 시스템 전체 값에 @를 붙입니다. -i와 함께 쓰지 않습니다. 6.1부터
-c 메모리 압축 통계를 보여 줍니다(위 표). AME가 켜져 있을 때만 쓸 수 있습니다. 6.1부터
-f 시스템 시작 뒤의 fork 수를 보고합니다.
-h 하이퍼바이저 페이지 정보 절(hypv-page)을 보여 줍니다: hpi(초당 하이퍼바이저 페이지 인), hpit(페이지 인당 평균 시간, ms), pmem(파티션의 논리 메모리를 받치는 물리 메모리, GB). 6.1부터
-i 시스템 시작 뒤 장치마다 받은 인터럽트 수를 보여 줍니다. -I, -t, -w, -l은 무시합니다.
-I I/O 관점으로 보여 줍니다(위 표).
-l alp와 flp 열이 있는 large-page 절을 더 보여 줍니다.
-p pagesize 지정한 페이지 크기의 VMM 통계를 보통 출력 뒤에 붙입니다.
-P pagesize 지정한 페이지 크기에 해당하는 VMM 통계만 보여 줍니다.
-s sum 구조체의 내용, 곧 시스템 초기화 뒤 페이징 이벤트의 누적 수를 씁니다(아래 표). -v와만 함께 쓸 수 있습니다.
-S power 프로세서 통계(us, sy, id, wa, pc, ec)에 10의 power 제곱을 곱합니다. power는 0~3이며 기본은 0입니다. -f, -s, -i, -v, -p와 함께 쓰지 않습니다. 0이 아니면 us·sy·id·wa가 WPAR 기준이 아니라 시스템 전체 프로세서 소비 기준이 됩니다. 6.1부터
-t 출력 줄마다 옆에 HH:MM:SS 시각을 붙입니다. -f, -s, -i에서는 붙이지 않습니다.
-v VMM이 유지하는 여러 통계를 씁니다(아래 표). -s, -h와만 함께 쓸 수 있습니다.
-w 넓은 형식으로 보고합니다.
-W kthr 절에 w 열을 더합니다. -I와만 쓸 수 있습니다. 6.1부터

-s의 이벤트

이벤트 늘어나는 때
address translation faults 주소 변환 페이지 폴트가 날 때마다(입출력이 필요할 수도 아닐 수도 있음). 저장 보호 폴트는 제외
backtracks 앞선 페이지 폴트를 처리하는 중에 또 페이지 폴트가 날 때마다
CPU context switches 프로세서 문맥 교환(새 프로세스 디스패치)마다
decrementer interrupts decrementer 인터럽트마다
device interrupts 하드웨어 인터럽트마다
executable-filled page faults 명령어 페이지 폴트마다
extend XPT waits 접근한 세그먼트의 커밋이 진행 중이라 VMM이 프로세스를 기다리게 할 때마다
free frame waits 페이지 프레임을 요청했는데 빈 목록이 비어 채워질 때까지 기다릴 때마다
iodones VMM 입출력 요청이 끝날 때마다
mpc send / receive interrupts mpc 송신·수신 인터럽트마다
page ins / page outs VMM이 페이지를 읽거나 쓸 때마다(페이징 공간과 파일 공간 모두). 둘을 합하면 VMM이 시작한 실제 입출력 양
paging space page ins / outs VMM이 시작한 페이징 공간 입출력만
pages examined by the clock 클록 알고리즘(유사 LRU 교체)이 살펴본 페이지마다
pages freed by the clock 클록 알고리즘이 실제 메모리에서 비우기로 고른 페이지마다
pending I/O waits 페이지 인 입출력이 끝나기를 VMM이 프로세스에게 기다리게 할 때마다
phantom interrupts phantom 인터럽트마다
revolutions of the clock hand VMM 클록이 한 바퀴(메모리 전체 스캔)를 돌 때마다
start I/Os VMM이 시작한 읽기·쓰기 입출력 요청마다
syscalls 시스템 호출마다
total reclaims 새 입출력 없이 주소 변환 폴트를 해결할 때마다(이미 요청 중이거나, 미리 읽었거나, 빈 목록에 있었던 페이지)
traps 운영 체제가 유지하지 않음
zero-filled page faults 작업 저장소 폴트를 프레임을 0으로 채워 해결할 때마다
  • (6.1) -c와 함께 쓰면 compressed pool page ins·outs(부팅 뒤 압축 풀 입출력 수)가 더해집니다. -l과 함께 쓰면 large-page hi water count(대형 페이지 사용 수의 최댓값)가 더해집니다.
  • -p pagesize와 함께 쓰면 그 페이지 크기의 sum 구조체가 페이지 크기 머리글(예: 4K pages)과 함께 붙습니다. 이 절에는 페이지 크기와 관계없는 문맥 교환, 인터럽트, 트랩, 시스템 호출은 나오지 않습니다.
  • (6.1) -@ ALL과 함께 쓰면 시스템 전체 통계를 WPAR 절에 되풀이하고, wparname과 함께 쓰면 모든 지표를 보고하며 시스템 전체 값에 @를 붙입니다.

-v의 통계

통계 뜻
memory pages 실제 메모리 크기(4KB 페이지 수)
lruable pages 교체 대상이 되는 4KB 페이지 수(VMM 내부 페이지와 커널 텍스트의 고정 부분 제외)
free pages 빈 4KB 페이지 수
memory pools 메모리 풀 수(vmo로 관리하는 조정 값)
pinned pages 고정된 4KB 페이지 수. 커널 잠금(vmm_klock_mode)이 켜져 있으면 klocked 페이지 포함
maxpin percentage 고정할 수 있는 실제 메모리 비율(vmo 조정 값)
minperm percentage 실제 메모리 대비 비율(vmo 조정 값)
maxperm percentage 실제 메모리 대비 비율(vmo 조정 값)
numperm percentage 지금 파일 캐시가 쓰는 메모리 비율
file pages 지금 파일 캐시가 쓰는 4KB 페이지 수
compressed percentage 압축 페이지가 쓰는 메모리 비율
compressed pages 압축된 메모리 페이지 수
numclient percentage 클라이언트 페이지가 차지한 메모리 비율
maxclient percentage 클라이언트 페이지에 쓸 수 있는 최대 메모리 비율(vmo 조정 값)
client pages 클라이언트 페이지 수
remote pageouts scheduled 클라이언트 파일 시스템으로 예약한 페이지 아웃 수
pending disk I/Os blocked with no pbuf pbuf(LVM 계층의 고정 메모리 버퍼)가 없어 막힌 디스크 입출력 요청 수
paging space I/Os blocked with no psbuf psbuf(VMM 계층의 고정 메모리 버퍼)가 없어 막힌 페이징 공간 입출력 요청 수
filesystem I/Os blocked with no fsbuf fsbuf(파일 시스템 계층의 고정 메모리 버퍼)가 없어 막힌 파일 시스템 입출력 요청 수
client filesystem I/Os blocked with no fsbuf fsbuf가 없어 막힌 클라이언트 파일 시스템(NFS, VxFS) 입출력 요청 수
external pager filesystem I/Os blocked with no fsbuf fsbuf가 없어 막힌 외부 페이저 파일 시스템(JFS2) 입출력 요청 수
  • (6.1) -h와 함께 쓰면 가상화 파티션 메모리 페이지 폴트의 해결 시간(초)과 수, 하이퍼바이저에 빌려준 4KB 페이지 프레임 수와 메모리 비율이 더해집니다.
  • (6.1) -c와 함께 쓰면 Compressed Pool Size, 압축 풀에 쓰인 실제 메모리 비율, 압축 풀의 빈 페이지, 목표·달성 메모리 확장 계수가 더해집니다.
  • (6.1) -@ ALL과 함께 쓰면 시스템 전체 통계를 WPAR 절에 되풀이하지 않습니다.

참고(6.1): AME가 켜져 있으면 메모리 통계를 확장된 관점으로 보고합니다. 환경 변수 AME_MEMVIEW를 TRUE로 두면 실제 관점으로 보고하며, -c의 통계에는 영향이 없습니다.

영어 원문

Note: If the -f (or -s) flag is entered on the command line, then the system accepts the -f (or -s) flag and ignores other flags. If both the -f and -s flags are specified, the system accepts only the first flag and ignore the second flag.

  • -@ wparname — Reports the Virtual Memory activity of a workload partition: • The -@ ALL option indicates that the report pertains to the system and global environment, in addition to all of the workload partitions in the system. Note: The values that are system-wide statistics are marked with dash sign (-) against the WPAR section. • The -@ wparname flag indicates that the activity is only for that workload partition. In a workload partition, if you specify the -@ flag, system-wide statistics and workload partition statistics are displayed. The system-wide statistics are marked with the at sign (@). Note: Do not use the -@ flag with any combination of the -i flag.
  • -c — Displays memory compression statistics with the new columns of output, csz, cfr, and dxm under the heading memory, and columns ci and co under the heading page instead of the columns re and cy. Note: This option is available only when Active Memory Expansion is enabled.
  • -f — Reports the number of forks since system startup.
  • -i — Displays the number of interrupts that are taken by each device since system startup. Note: The -I, -t, -w, and -l flags are ignored when they are specified with the -i flag.
  • -I — Displays I/O oriented view with the new columns of output, p under heading kthr,and columns fi and fo under heading page instead of the columns re and cy in the page heading.
  • -l — Displays an extra "large-page" section with the alp and flp columns.
  • -p pagesize — Appends the VMM statistics for the specified page size to the regular vmstat output.
  • -P pagesize — Displays only the VMM statistics, which are relevant for the specified page size.
  • -s — Writes to standard output the contents of the sum structure, which contains an absolute count of paging events since system initialization. The -s flag can only be used with the -v flag. These events are described as follows: address translation faults Incremented for each occurrence of an address translation page fault. I/O may or may not be required to resolve the page fault. Storage protection page faults (lock misses) are not included in this count.
  • -s — backtracks Incremented for each page fault that occurs while resolving a previous page fault. (The new page fault must be resolved first and then initial page faults can be backtracked.) CPU context switches Incremented for each processor context switch (dispatch of a new process). decrementer interrupts Incremented on each decrementer interrupt. device interrupts Incremented on each hardware interrupt. executable-filled page faults Incremented for each instruction page fault. extend XPT waits Incremented each time that a process is waited by VMM due to a commit in progress for the segments accessed. free frame waits Incremented each time that a process requests a page frame. The free list is empty, and the process is forced to wait while the free list is replenished. iodones Incremented at the completion of each VMM I/O request. mpc send interrupts Incremented on each mpc send interrupt. mpc receive interrupts Incremented on each mpc receive interrupt. page ins Incremented for each page read in by the virtual memory manager. The count is incremented for page ins from page space and file space. Along with the page-out statistic, this value represents the total amount of real I/O initiated by the virtual memory manager. page outs Incremented for each page that is written out by the virtual memory manager. The count is incremented for page outs to page space and for page outs to file space. Along with the page in statistic, this statistic represents the total amount of real I/O initiated by the virtual memory manager. paging space page ins Incremented for VMM initiated page ins from paging space only. paging space page outs Incremented for VMM initiated page outs to paging space only. pages examined by the clock VMM uses a clock-algorithm to implement a pseudo least recently used (lru) page replacement scheme. Pages are aged by being examined by the clock. This count is incremented for each page examined by the clock. pages freed by the clock Incremented for each page the clock algorithm selects to free from real memory. pending I/O waits Incremented each time that a process is waited by VMM for a page-in I/O to complete.
  • -s — phantom interrupts Incremented on each phantom interrupt revolutions of the clock hand Incremented for each VMM clock revolution (that is after each complete scan of memory). start I/Os Incremented for each read or write I/O request that is initiated by VMM. syscalls Incremented for each system call. total reclaims Incremented when an address translation fault can be satisfied without initiating a new I/O request. This can occur if the page has been previously requested by VMM, but the I/O has not yet completed; or if the page was pre-fetched by VMM's read-ahead algorithm, but was hidden from the faulting segment; or if the page has been put on the free list and has not yet been reused. traps Not maintained by the operating system. zero-filled page faults Incremented if the page fault is to working storage and can be satisfied by assigning a frame and zero-filling it. When the -c flag is specified along with the -s flag, the following additional metrics are displayed. compressed pool page ins Number of page-ins from Compressed Pool since system boot. compressed pool page outs Number of page-outs to Compressed Pool since system boot.
  • -s — When used with the -p pagesize option, the -s option appends the sum structure for the specified page size to the system-wide sum structure. This additional stanza is preceded by a page size header (for example, 4K pages). The following details are not be displayed in this pagesize-based stanza as these statistics are not related to page sizes: • Processor context switches • Device interrupts • Software interrupts • Decrementer interrupts • MPC-sent interrupts • MPC-received interrupts • Phantom interrupts • Traps • Syscalls Notes: 1. When the -s flag is used with the -@ ALL option, the system-wide statistics are repeated in the workload partition section. 2. When the -s flag is used with the wparname option, all metrics are reported and the system-wide statistics are marked with the at sign (@). 3. When the -s flag is used with the -l flag, the vmstat command displays the following metric: large-page hi water count Specifies the maximum value of the large-page inuse count.
  • -S power — Multiplies the statistics of the processor with a value of 10power. The default value of the power is 0. The following statistics are scaled: • us • sy • id • wa • pc • ec Notes: 1. Do not use the -S flag with the -f, -s, -i, -v, or -p flags. 2. When the -S flag is specified, the us, sy, id, and wa statistics change. By default, the us, sy, id, and wa statistics are relative to the processor consumption of WPAR. When the -S flag is specified with a value of power that is not equal to zero, these statistics will be relative to system-wide processor consumption. 3. The value of power for -S flag can be only between 0 and 3.
  • -t — Prints the time-stamp next to each line of output of vmstat. The time-stamp is displayed in the HH:MM:SS format. Note: Time stamp is not be printed if -f, -s, or -i flags are specified.
  • -v — Writes to standard output various statistics maintained by the Virtual Memory Manager. The -v flag can only be used with the -s and the -h flags. If you specify the -v flag, the following statistics are displayed: compressed percentage Percentage of memory used by compressed pages. client filesystem I/Os blocked with no fsbuf Number of client filesystem I/O requests blocked because no fsbuf was available. NFS (Network File System) and VxFS (Veritas) are client filesystems. Fsbuf are pinned memory buffers used to hold I/O requests in the filesystem layer. client pages Number of client pages. compressed pages Number of compressed memory pages. external pager filesystem I/Os blocked with no fsbuf Number of external pager client filesystem I/O requests blocked because no fsbuf was available. JFS2 is an external pager client filesystem. Fsbuf are pinned memory buffers used to hold I/O requests in the filesystem layer. file pages Number of 4 KB pages that are currently used by the file cache. free pages Number of free 4 KB pages. filesystem I/Os blocked with no fsbuf Number of filesystem I/O requests blocked because no fsbuf was available. Fsbuf are pinned memory buffers used to hold I/O requests in the filesystem layer. lruable pages Number of 4 KB pages that are considered for replacement. This number excludes the pages that are used for VMM internal pages, and the pages that are used for the pinned part of the kernel text. maxclient percentage Tuning parameter (managed using vmo) specifying the maximum percentage of memory, which can be used for client pages. maxperm percentage Tuning parameter (managed using vmo) in percentage of real memory. maxpin percentage Tuning parameter (managed using vmo) specifying the percentage of real memory which can be pinned. memory pages Size of real memory in number of 4 KB pages. memory pools Tuning parameter (managed using vmo) specifying the number of memory pools. minperm percentage Tuning parameter (managed using vmo) in percentage of real memory. numclient percentage Percentage of memory that is occupied by client pages.
  • -v — (Statistics that are displayed by -v, continued): numperm percentage Percentage of memory that is currently used by the file cache. paging space I/Os blocked with no psbuf Number of paging space I/O requests that are blocked because the psbuf space is not available. The psbufs space is pinned memory buffers that are used to hold I/O requests at the virtual memory manager layer. pending disk I/Os blocked with no pbuf Number of pending disk I/O requests blocked because no pbuf was available. Pbufs are pinned memory buffers used to hold I/O requests at the logical volume manager layer pinned pages Number of pinned 4 KB pages. Note: When the kernel locking feature (vmm_klock_mode parameter) is enabled, the pinned pages include the kernel locking (klocked) pages. For more information about the kernel locking feature, enter the following command: vmo -h vmm_klock_mode. remote pageouts scheduled Number of pageouts scheduled for client file systems. If you specify the -h flag with the -v flag, the following additional metrics are displayed: Time resolving virtualized partition memory page faults The total time that the virtual partition is blocked to wait for the resolution of its memory page fault. The time is measured in seconds, with millisecond granularity. Virtualized partition memory page faults The total number of virtual partition memory page faults that are recorded for the virtualized partition. Number of 4 KB page frames loaned The number of the 4 KB pages of partition's memory loaned to the hypervisor. Percentage of partition memory loaned The percentage of the partition's memory loaned to the hypervisor. Notes: 1. When the -v flag is used with the -@ ALL option, the system-wide statistics are not repeated in the workload partition section. 2. When the -s flag is used with the wparname option, all metrics are reported and the system-wide statistics are marked with the at sign (@). When the -c flag is specified along with the -v flag, the following additional metrics are displayed: Compressed Pool Size Size of Compressed Pool, in 4K page unit. percentage of true memory that is used for compressed pool Percentage of unexpanded memory that is used for compressed pool. free pages in compressed pool (4K pages) Number of free pages in compressed pool, in 4K page unit. target memory expansion factor Target memory expansion factor that is configured for the LPAR. achieved memory expansion factor Current memory expansion factor achieved.
  • -h — Displays the hypv-page section that includes the hypervisor page information. The hypv-page section contains the following metrics: hpi Number of hypervisor page-in per second. hpit Average time that is spent in milliseconds per hypervisor page-in. pmem Amount of physical memory that is backing the logical memory of partitions. The value is measured in gigabytes. If you specify the -h flag with the -v flag, the following metrics are displayed in addition to the metrics that are displayed using the -v flag: Time resolving virtualized partition memory page faults The total time that the virtual partition is blocked to wait for the resolution of its memory page fault. The time is measured in seconds, with millisecond granularity. Virtualized partition memory page faults The total number of virtual partition memory page faults that are recorded for the virtualized partition. Number of 4 KB page frames loaned The number of the 4 KB pages of the memory that is loaned to the hypervisor in the partition. Percentage of partition memory loaned The percentage of the memory loaned to the hypervisor in the partition.
  • -w — Displays the report in wide mode.
  • -W — Displays an extra field w in the kthr section. This option is allowed only with -I flag.
  • Notes:
  1. If Active Memory Expansion is enabled, the vmstat reports memory statistics in the expanded view. However, if the environment variable AME_MEMVIEW is set to TRUE, the memory statistics represent the true view.

  2. The AME_MEMVIEW environment variable has no impact on memory statistics reported using the -c option.

예제

명령 하는 일
vmstat 부팅 뒤 통계 요약
vmstat 2 5 2초 간격으로 요약 5번
vmstat scdisk13 scdisk14 부팅 뒤 요약에 논리 디스크 scdisk13·scdisk14의 통계를 더함
vmstat -f fork 통계
vmstat -s 여러 이벤트의 누적 수
vmstat -t 출력 줄마다 시각을 붙임
vmstat -I I/O 관점의 다른 열
vmstat -vs 쓸 수 있는 VMM 통계 모두
vmstat -l 8 8초 간격으로 alp·flp 열이 있는 대형 페이지 절
vmstat -p 4K 4KB 페이지 크기의 VMM 통계
vmstat -p ALL (-p all) 시스템이 지원하는 모든 페이지 크기의 VMM 통계
vmstat -P 4K 4KB 페이지 크기의 VMM 통계만
vmstat -P ALL (-P all) 모든 페이지 크기의 VMM 통계만
vmstat -@ ALL 부팅 뒤 모든 WPAR의 요약(6.1)
vmstat -vs -@ ALL 모든 WPAR의 VMM 통계(6.1)
vmstat -@ WPAR 안에서 WPAR과 시스템 전체 VMM 통계(6.1)
vmstat -S 1 프로세서 값에 10을 곱해 표시(6.1)
vmstat -h 하이퍼바이저 페이지 통계(6.1)
vmstat -vh 하이퍼바이저에 빌려준 페이지 정보(6.1)
vmstat -c 메모리 압축 통계(AME LPAR, 6.1)
vmstat -c -P ALL 페이지 크기별 메모리 압축 통계(6.1)
vmstat -s -c -s 통계에 메모리 압축 정보를 더함(6.1)
vmstat -v -c -v 통계에 메모리 압축 정보를 더함(6.1)

자주 쓰는 형태:

bash
vmstat -t 5 12
vmstat -Iw 2 10
vmstat -v | egrep "numperm|maxperm|blocked"
영어 원문
  1. To display a summary of the statistics since boot, enter the following command:
vmstat
  1. To display five summaries at 2-second intervals, enter the following command:
vmstat 2 5
  1. To display a summary of the statistics since boot including statistics for logical disks scdisk13 and scdisk14, enter the following command:
vmstat scdisk13 scdisk14
  1. To display fork statistics, enter the following command:
vmstat -f
  1. To display the count of various events, enter the following command:
vmstat -s
  1. To display time-stamp next to each column of output of vmstat, enter the following command:
vmstat -t
  1. To display the I/O oriented view with an alternative set of columns, enter the following command:
vmstat -I
  1. To display all the VMM statistics available, enter the following command:
vmstat -vs
  1. To display the large-page section with the alp and flp columns at 8-second intervals, enter the following command:
vmstat -l 8
  1. To display the VMM statistics specific to a particular page size (in the example, 4 KB), enter the following command:
vmstat -p 4K
  1. To display the VMM statistics for all page sizes that are supported on the system, enter the following command:
vmstat -p ALL

Or enter the following command:

vmstat -p all
  1. To display only the VMM statistics for a particular page size (in this example, 4 KB), enter the following command:
vmstat -P 4K
  1. To display only the per-page breakdown of VMM statistics for all supported page sizes, enter the following command:
vmstat -P ALL

Or enter the following command:

vmstat -P all
  1. To display a summary of the statistics for all of the workload partitions after boot, enter the following command:
vmstat -@ ALL
  1. To display all of the VMM statistics available for all of the workload partitions, enter the following command:
vmstat -vs -@ ALL
  1. To display both WPAR and system-wide VMM statistics from a workload partition, enter the following command:
vmstat -@
  1. To multiply the processor values with 10 and display the results, enter the following command:
vmstat -S 1
  1. To display the statistics for the hypervisor page, enter the following command:
vmstat -h
  1. To display the information about pages that are loaned to the hypervisor, enter the following command:
vmstat -vh
  1. To display memory compression statistics (in an LPAR with Active Memory Expansion enabled), enter the following command:
vmstat -c
  1. To display memory compression statistics specific to per-pagesize (in an LPAR with Active Memory Expansion enabled), enter the following command:
vmstat -c -P ALL
  1. To append memory compression information to the statistics displayed by -soption (in an LPAR with Active Memory Expansion enabled), enter the following command:
vmstat -s -c
  1. To append memory compression information to the statistics displayed by -voption (in an LPAR with Active Memory Expansion enabled), enter the following command:
vmstat -v -c

파일

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

관련 명령어: vmo, iostat

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

Related reference:

  • vmo Command

Related information:

  • iostat command
  • Memory performance

리눅스(GNU)와 다른 점

항목 AIX 5.3·6.1 리눅스 vmstat(procps)
메모리 단위 4KB 페이지 수(avm, fre) KB(swpd, free, buff, cache)
페이징 pi·po(페이징 공간 페이지), fr·sr·cy si·so(KB/s)
-s 부팅 뒤 누적 이벤트 메모리·CPU 누적 표
-v VMM 통계(numperm, fsbuf 등) 버전 출력
가상화 pc, ec, -h, -@ st(stolen) 열

같은 글자라도 뜻이 다른 옵션이 있으니(-v, -s, -p), 리눅스 습관대로 쓰지 않도록 주의합니다.