[AIX 성능 도구 13] procmon — Performance Workbench 프로세스 모니터
https://archive.horanglab.com/posts/aix-perf-procmon
핵심 정리
- procmon은 프로세스를 그래픽 화면에서 보고 관리하는 Performance Workbench 플러그인입니다.
bos.perf.gtools를 설치하고/usr/bin/perfwb로 실행합니다(/opt/perfwb/perfwb를 직접 실행하지 않음). - 기본으로 CPU 사용량 기준 상위 20개 프로세스를 5초마다 새로 고쳐 보여 주며, 개수·주기·정렬 열은 Table Properties에서 바꿉니다.
- 프로세스 표의 기본 열은 CPUPER, PRM, ELOGIN, COMMAND, (6.1) WPAR이며, PPID·NICE·DRSS·THCOUNT·MAJFLT 등 여러 열을 더할 수 있습니다. 표 아래에는 열마다 합계가 나옵니다.
- 표는 XML, HTML, CSV로 내보낼 수 있고, Table Filters로 프로세스를 거를 수 있습니다.
- 프로세스를 고르고 오른쪽 클릭하면
svmon,renice,kill, proc 도구(procfiles,proctree,procstack등)를 바로 실행합니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 WPAR 열과 WPAR 표가 더해짐) |
| 원문 | Performance Tools Guide and Reference — 5.3판 8장(209212쪽), 6.1판 241244쪽 |
| 실행 | /usr/bin/perfwb (Performance Workbench) |
| 파일 세트 | bos.perf.gtools |
| 관련 명령어 | topas, ps, svmon, renice, kill, procfiles, proctree |
이 장은 procmon 도구를 자세히 설명합니다.
영어 원문
The procmon tool
This section provides detailed information about the procmon tool.
procmon 도구 개요
procmon 도구는 AIX를 실행하는 시스템에서 쓸 수 있습니다.
procmon 도구로 시스템에서 실행 중인 프로세스를 보고 관리할 수 있습니다. 그래픽 화면이 있으며, 여러 필드로 정렬할 수 있는 프로세스 지표 표를 보여 줍니다. 표에 나오는 프로세스 수는 기본 20개이며, 주 메뉴의 Table Properties 패널에서 바꿀 수 있습니다. 정렬 지표 기준 상위 프로세스만 나오며 기본 정렬 기준은 CPU 사용량입니다.
프로세스 지표 표의 새로 고침 주기는 기본 5초이며, 주 메뉴의 Table Properties 패널이나 Refresh 단추로 바꿀 수 있습니다.
기본으로 procmon 도구는 다음을 보여 줍니다.
- 프로세스가 실행된 시간
- 프로세스가 쓰는 CPU 자원의 양
- 프로세스가 시스템에서 불이익(penalty)을 받고 있는지
- 프로세스가 쓰는 메모리 양
- 프로세스가 하는 I/O 양
- 프로세스의 우선순위와 nice 값
- 프로세스를 만든 사용자
주 메뉴의 Table Properties 패널에서 표시할 다른 지표를 고를 수 있습니다. 자세한 것은 "procmon 도구의 프로세스 표"를 봅니다.
표시된 프로세스를 거를 수 있습니다. 자세한 것은 "프로세스 거르기"를 봅니다.
이 프로세스들에 AIX 성능 명령을 실행할 수도 있습니다. 자세한 것은 "프로세스에 AIX 명령 실행하기"를 봅니다.
procmon 도구는 Performance Workbench 플러그인이므로 Performance Workbench 프레임워크 안에서만 시작할 수 있습니다. smitty 도구나 installp 명령으로 bos.perf.gtools 파일 세트를 설치해야 하며, 그다음 /usr/bin/perfwb 스크립트를 실행해 Performance Workbench를 엽니다.
참고: /opt/perfwb/perfwb 바이너리 파일을 직접 실행하지 마십시오.
영어 원문
Overview of the procmon tool
You can use the procmon tool on systems running AIX.
The procmon tool enables you to view and manage the processes running on a system. The procmon tool has a graphical interface and displays a table of process metrics that you can sort on the different fields that are provided. The default number of processes listed in the table is 20, but you can change the value in the Table Properties panel from the main menu. Only the top processes based on the sorting metric are displayed and the default sorting key is CPU consumption.
The default value of the refresh rate for the table of process metrics is 5 seconds, but you can change the refresh rate by either using the Table Properties panel in the main menu or by clicking on the Refresh button.
By default, the procmon tool displays the following:
How long a process has been running
How much CPU resource the processes are using
Whether processes are being penalized by the system
How much memory the processes are using
How much I/O a process is performing
The priority and nice values of a process
Who has created a particular process
You can choose other metrics to display from the Table Properties panel in the main menu. For more information, see “The process table of the procmon tool.”
You can filter any of the processes that are displayed. For more information, see Filtering processes.
You can also perform certain AIX performance commands on these processes. For more information, see Performing AIX commands on processes.
The procmon tool is a Performance Workbench plugin, so you can only launch the procmon tool from within the Performance Workbench framework. You must install the bos.perf.gtools fileset by either using the smitty tool or the installp command. You can then access the Performance Workbench by running the /usr/bin/perfwb script.
Note: Do not run the /opt/perfwb/perfwb binary file.
procmon 도구의 구성 요소
procmon 도구의 그래픽 화면은 다음 구성 요소로 이루어집니다.
영어 원문
Components of the procmon tool
The graphical interface of the procmon tool consists of the following components.
전역 통계 영역
전역 통계 영역은 procmon 도구 창 맨 위에 나오는 표입니다. 시스템이 쓰고 있는 CPU와 메모리 양을 보여 줍니다.
메뉴 막대의 Refresh 단추를 누르거나 메뉴 막대에서 자동 새로 고침을 켜서 통계를 새로 고칠 수 있습니다. 통계 정보를 저장하려면 표를 다음 형식 가운데 하나로 내보냅니다.
- XML
- HTML
- CSV
영어 원문
The global statistics area of the procmon tool
The global statistics area is a table that is displayed at the top of the procmon tool window. The global statistics area displays the amount of CPU and memory that is being used by the system.
You can refresh the statistics data by either clicking on the Refresh button in the menu bar or by activating the automatic refresh option through the menu bar. To save the statistics information, you can export the table to any of the following file formats:
XML
HTML
CSV
프로세스 표
프로세스 표는 procmon 도구의 주 구성 요소입니다. 시스템에서 실행 중인 여러 프로세스를 사용자 구성에 따라 정렬하고 걸러서 보여 줍니다.
표에 나오는 프로세스 수는 기본 20개이며 주 메뉴의 Table Properties 패널에서 바꿀 수 있습니다.
열 머리의 노란 화살표가 프로세스 표의 정렬 기준입니다. 오름차순이면 위, 내림차순이면 아래를 가리킵니다. 아무 열 머리나 누르면 정렬 기준이 바뀝니다.
프로세스 표를 원하는 대로 바꾸고, 여러 프로세스의 정보를 수정하고, 표시된 프로세스에 명령을 실행할 수 있습니다. 기본으로 procmon 도구는 다음 열을 보여 줍니다.
| 열 | 설명 |
|---|---|
| CPUPER | 마지막 새로 고침 이후 프로세스마다 쓴 CPU의 백분율 |
| PRM | 실메모리 사용 백분율 |
| ELOGIN | 프로세스 사용자의 유효 로그인 |
| COMMAND | 시작한 프로세스의 짧은 이름 |
| WPAR | (6.1) 프로세스의 WPAR |
다음 같은 다른 지표를 표시하도록 고를 수 있습니다.
| 열 | 설명 |
|---|---|
| PPID | 부모 프로세스 식별자 |
| NICE | 프로세스의 nice 값 |
| PRI | 프로세스의 우선순위 |
| DRSS | 데이터 상주 집합(resident set) 크기 |
| TRSS | 텍스트 상주 집합 크기 |
| STARTTIME | 명령이 시작된 시각 |
| EUID | 유효 사용자 식별자 |
| RUID | 실제 사용자 식별자 |
| EGID | 유효 그룹 식별자 |
| RGID | 실제 그룹 식별자 |
| THCOUNT | 쓰는 스레드 수 |
| CLASSID | 프로세스가 속한 WLM 클래스의 식별자 |
| CLASSNAME | 프로세스가 속한 WLM 클래스의 이름 |
| TOTDISKIO | 그 프로세스의 디스크 I/O |
| NVCSW | 자발적 문맥 교환 횟수 |
| NIVCSW | 비자발적 문맥 교환 횟수 |
| MINFLT | 마이너 페이지 폴트 |
| MAJFLT | 메이저 페이지 폴트 |
| INBLK | 입력 블록 |
| OUBLK | 출력 블록 |
| MSGSEND | 보낸 메시지 |
| MSGRECV | 받은 메시지 |
| EGROUP | 유효 그룹 이름 |
| RGROUP | 실제 그룹 이름 |
관심 있는 지표는 표 속성(table properties)이나 기본 설정(preference)으로 표시합니다. 표 속성을 바꾸면 새 구성 값은 현재 세션에만 적용되고, 기본 설정을 바꾸면 procmon 도구의 다음 세션에 적용됩니다.
프로세스 표에 나오는 값은 두 종류입니다.
- 실제 값
- 변화량(delta) 값
실제 값은 커널에서 가져와 표에 보여 주는 값입니다. PID, PPID, TTY가 예입니다.
변화량 값은 마지막으로 저장한 측정값에서 계산한 값입니다. 새로 고침 사이에 잰 값으로 계산하는 프로세스별 CPU 백분율이 예입니다.
프로세스 표 아래에는 프로세스 표의 열마다 값의 합을 보여 주는 표가 하나 더 있습니다. 예를 들어 CPU를 가장 많이 쓰는 상위 20개 프로세스가 전체 CPU의 몇 퍼센트를 쓰는지 쉽게 알 수 있습니다.
메뉴 막대의 Refresh 단추를 누르거나 자동 새로 고침을 켜서 데이터를 새로 고칠 수 있습니다. 통계 정보를 저장하려면 표를 다음 형식 가운데 하나로 내보냅니다.
- XML
- HTML
- CSV
영어 원문
The process table of the procmon tool
The process table is the main component of the procmon tool. The process table displays the various processes that are running on the system, ordered and filtered according to the user configuration.
The default value of the number of processes listed in the process table is 20, but you can change this value from the Table Properties panel from the main menu.
The yellow arrow key in the column header indicates the sort key for the process table. The arrow points either up or down, depending on whether the sort order is ascending or descending, respectively. You can change the sort key by clicking on any of the column headers.
You can customize the process table, modify the information on the various processes, and run commands on the displayed processes. By default, the procmon tool displays the following columns:
- CPUPER — Percentage of CPU used per process since the last refresh
- PRM — Percent real memory usage
- ELOGIN — Effective login of the process user
- COMMAND — Short name of the process launched
- WPAR — WPAR of the process
You can choose to display other metrics, like the following:
- PPID — Parent process identifier
- NICE — Nice value for the process
- PRI — Priority of the process
- DRSS — Data resident set size
- TRSS — Text resident set size
- STARTTIME — Time when the command started
- EUID — Effective user identifier
- RUID — Real user identifier
- EGID — Effective group identifier
- RGID — Real group identifier
- THCOUNT — Number of threads used
- CLASSID — Identifier of the class which pertains to the WLM process
- CLASSNAME — Name of the class which pertains to the WLM process
- TOTDISKIO — Disk I/O for that process
- NVCSW — N voluntary context switches
- NIVCSW — N involuntary context switches
- MINFLT — Minor page faults
- MAJFLT — Major page faults
- INBLK — Input blocks
- OUBLK — Output blocks
- MSGSEND — Messages sent
- MSGRECV — Messages received
- EGROUP — Effective group name
- RGROUP — Real group name
You can use either the table properties or preference to display the metrics you are interested in. If you choose to change the table properties, the new configuration values are set for the current session only. If you change the preferences, the new configuration values are set for the next session of the procmon tool.
There are two types of values listed in the process table:
Real values
Delta values
Real values are retrieved from the kernel and displayed in the process table. An example of a real value is the PID, PPID, or TTY.
Delta values are values that are computed from the last-stored measurements. An example of a delta value is the CPU percent for each process, which is computed using the values measured between refreshes.
Below the process table, there is another table that displays the sum of the values for each column of the process table. For example, this table might provide a good idea of the percentage of total CPU used by the top 20 CPU-consuming processes.
You can refresh the data by either clicking on the Refresh button in the menu bar or by activating the automatic refresh option through the menu bar. To save the statistics information, you can export the table to any of the following file formats:
XML
HTML
CSV
Performance Workbench 상태 줄
Performance Workbench의 상태 줄에는 정보를 가져온 날짜와 시스템 이름이 나옵니다. 다른 보기(view)나 관점(perspective)을 켜면 상태 줄이 숨겨지지만, 정보를 새로 고치면 다시 나타납니다.
영어 원문
The status line of the Performance Workbench
The Performance Workbench status line displays the date on which the information was retrieved, as well as the name of the system. The status line is hidden if you activate another view or perspective, but automatically reappears if you refresh the information.
(6.1) WPAR 표
WPAR 탭은 시스템에 정의된 모든 WPAR를 표로 보여 줍니다.
기본으로 procmon 도구는 다음 열을 보여 줍니다.
| 열 | 설명 |
|---|---|
| Name | WPAR 이름 |
| Hostname | WPAR 호스트 이름 |
| Type | WPAR 유형. System 또는 Application |
| State | WPAR 상태. Active, Defined, Transitional, Broken, Paused, Loaded, Error 가운데 하나 |
| Directory | WPAR 루트 디렉터리 |
| Nb. virtual PIDs | 이 WPAR에서 실행 중인 가상 PID 수 |
영어 원문
The WPAR table of the procmon tool
A WPAR tabulation displays all the WPAR defined on the system in a table.
By default, the procmon tool displays the following columns:
- Name — WPAR name
- Hostname — WPAR hostname
- Type — WPAR type, either System or Application
- State — WPAR state–this can have one of the following values: Active, Defined, Transitional, Broken, Paused, Loaded, Error
- Directory — WPAR root directory
- Nb. virtual PIDs — Number of virtual PIDs running in this WPAR
프로세스 거르기
프로세스 표에 나오는 여러 기준으로 프로세스를 거를 수 있습니다. 필터를 만들려면 메뉴 막대에서 Table Filters를 고릅니다. 새 창이 열리고 필터 목록이 나옵니다.
영어 원문
Filtering processes
You can filter processes based on the various criteria that is displayed in the process table. To create a filter, select Table Filters from the menu bar. A new window opens and displays a list of filters.
프로세스에 AIX 명령 실행하기
하나 이상의 프로세스에 다음 명령을 실행하려면 프로세스 표에서 프로세스를 고르고 마우스 오른쪽 단추를 눌러 Commands나 Modify를 고른 다음 실행할 명령을 고릅니다. 새 창이 열려 명령이 실행되는 동안 출력을 보여 줍니다.
STOP 단추를 눌러 명령을 멈출 수 있습니다.
프로세스 표에서 고른 프로세스에 다음 AIX 명령을 실행할 수 있습니다.
svmon명령renice명령kill명령- 다음 proc 도구 명령:
procfiles,proctree,procsig,procstack,procrun,procmap,procflags,proccred,procldd
영어 원문
Performing AIX commands on processes
To run any of the following commands on one or more processes, select the processes in the process table and right click your mouse, and select either Commands or Modify and then select the command you want to run. A new window opens, which displays the command output while the command is running.
You can interrupt the command by clicking on the STOP button.
You can run the following AIX commands on the processes you select in the process table:
The svmon command
The renice command
The kill command
The following proctools commands: – The procfiles command
– The proctree command – The procsig command – The procstack command – The procrun command – The procmap command – The procflags command – The proccred command – The procldd command
자주 쓰는 형태
lslpp -l bos.perf.gtools # 설치 확인
/usr/bin/perfwb & # Performance Workbench 실행(X 화면 필요)
topas -P # 텍스트 화면에서 비슷한 프로세스 목록
관련 글: procfiles 명령어, proctree 명령어, topas 명령어, 연재 목차