[AIX 운영 체제와 장치 관리 57] AHAFS 이벤트 데이터 예와 사전 정의 이벤트 생산자 — INFO_LVL별 출력, 오류 형식, BUF_WRAP, modFile·modFileAttr·modDir·utilFs·waitTmCPU·waitersFreePg·waitTmPgInOut

핵심 정리

  • INFO_LVL=1은 시각, 순번, PID·UID·GID·프로그램 이름(스택 추적 가능 생산자), 반환 코드를, 2는 여기에 생산자 메시지(BEGIN_EVPROD_INFO~END_EVPROD_INFO)를, 3은 스택 추적(STACK_TRACE)을 더합니다.
  • 생산자 오류나 이미 임계값을 넘은 경우(EALREADY)는 시각, 순번, RC_FROM_EVPROD만 담은 오류 형식으로 기록됩니다. 버퍼가 넘치면 BUF_WRAP, 이벤트가 버퍼보다 크면 EVENT_OVERFLOW가 먼저 나오며 이때는 BUF_SIZE를 늘립니다.
  • modFile은 파일 내용 수정, modFileAttr은 모드·소유권·ACL 변경, modDir은 디렉터리 안 객체 생성·삭제(재귀 아님)를 감시하며, 원격·ahafs·procfs·namefs 파일 시스템과 심볼릭 링크는 감시할 수 없습니다.
  • utilFs는 JFS2 파일 시스템 사용률(1~100%)을 파일 쓰기·생성·삭제 때 확인하며 NOTIFY_CNT=1로 감시하길 강하게 권장합니다.
  • waitTmCPU는 실행 가능 스레드의 평균 CPU 대기 시간, waitersFreePg는 빈 프레임을 기다리는 스레드 수, waitTmPgInOut은 페이지 인·아웃 평균 대기 시간을 1초 간격으로 감시하며, 각각 정해진 모니터 파일 하나만 쓸 수 있습니다.
항목 내용
버전 AIX 6.1 (5.3판에 없는 새 장)
원문 Operating system and device management — 5.3판 없음, 6.1판 604~616쪽
모니터 팩토리 /aha/fs/modFile.monFactory, /aha/fs/modFileAttr.monFactory, /aha/fs/modDir.monFactory, /aha/fs/utilFs.monFactory, /aha/cpu/waitTmCPU.monFactory, /aha/mem/waitersFreePg.monFactory, /aha/mem/waitTmPgInOut.monFactory
관련 헤더 sys/ahafs_evProds.h(반환 코드 정의)

AHAFS_THRESHOLD_STATE와 AHAFS_STKTRACE_AVAILABLE를 지정했고 이벤트 소비자에게 메시지를 넘기는 이벤트 생산자의 세 수준 출력은 다음과 같습니다.

INFO_LVL=1:

text
BEGIN_EVENT_INFO
TIME_tvsec=1269863383
TIME_tvnsec=455993143
SEQUENCE_NUM=0
PID=6947038
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=cat
RC_FROM_EVPROD=1000
END_EVENT_INFO

INFO_LVL=2:

text
BEGIN_EVENT_INFO
TIME_tvsec=1269863383
TIME_tvnsec=455993143
SEQUENCE_NUM=0
PID=6947038
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=cat
RC_FROM_EVPROD=1000
BEGIN_EVPROD_INFO
event producer message here
END_EVPROD_INFO
END_EVENT_INFO

INFO_LVL=3:

text
BEGIN_EVENT_INFO
TIME_tvsec=1269863383
TIME_tvnsec=455993143
SEQUENCE_NUM=0
PID=6947038
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=cat
RC_FROM_EVPROD=1000
BEGIN_EVPROD_INFO
event producer message here
END_EVPROD_INFO
STACK_TRACE
ahafs_prod_callback+3C4
ahafs_cbfn_wrapper+30
ahafs_vn_write+204
vnop_rdwr+7E4
vno_rw+B4
rwuio+12C
rdwr+184
kewrite+16C
.svc_instr
write+1A4
_xwrite+6C
_xflsbuf+B0
__flsbuf+9C
copyopt_ascii+2C0
scat+388
main+11C
__start+68
END_EVENT_INFO

AHAFS_THRESHOLD_VALUE_HI를 지정했고 AHAFS_STKTRACE_AVAILABLE는 지정하지 않았으며 이벤트 소비자에게 메시지를 넘기는 이벤트 생산자의 세 수준 출력은 다음과 같습니다.

INFO_LVL=1:

text
BEGIN_EVENT_INFO
TIME_tvsec=1269866715
TIME_tvnsec=16678418
SEQUENCE_NUM=0
CURRENT_VALUE=3
RC_FROM_EVPROD=1000
END_EVENT_INFO

INFO_LVL=2와 INFO_LVL=3(스택 추적을 줄 수 없는 생산자이므로 두 수준 출력이 같음):

text
BEGIN_EVENT_INFO
TIME_tvsec=1269866715
TIME_tvnsec=16678418
SEQUENCE_NUM=0
CURRENT_VALUE=3
RC_FROM_EVPROD=1000
BEGIN_EVPROD_INFO
event producer message here
END_EVPROD_INFO
END_EVENT_INFO

오류 형식

이벤트 생산자에서 오류가 나면 모든 이벤트 생산자는 모든 INFO_LVL에서 다음 형식을 씁니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1269868036
TIME_tvnsec=966708948
SEQUENCE_NUM=0
RC_FROM_EVPROD=20
END_EVENT_INFO

소비자가 AHAFS_THRESHOLD_VALUE 이벤트를 감시하는데 현재 값이 이미 요청한 임계값을 넘었으면, 이 EALREADY 이벤트를 기록하는 데도 오류 형식을 씁니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1269868036
TIME_tvnsec=966708948
SEQUENCE_NUM=0
CURRENT_VALUE=1
RC_FROM_EVPROD=56
END_EVENT_INFO

BUF_WRAP과 EVENT_OVERFLOW

읽지 않은 데이터가 새 이벤트 발생 데이터로 덮어쓰이면 모니터 파일에 대한 read()의 첫 출력은 키워드 BUF_WRAP입니다. 버퍼 순환과 이벤트 넘침이 함께 있으면 늘 BUF_WRAP이 먼저 나오고 그다음 EVENT_OVERFLOW가 나옵니다. 다음은 버퍼 순환과 이벤트 넘침이 모두 있을 때 read()의 출력 예입니다.

첫 read()는 다음을 돌려줍니다.

text
BUF_WRAP

둘째 read()는 다음을 돌려줍니다.

text
EVENT_OVERFLOW

셋째 read()는 버퍼에 들어간 이벤트 데이터를 돌려줍니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1269863383
TIME_tvnsec=455993143
SEQUENCE_NUM=0
PID=6947038
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=cat
RC_FROM_EVPROD=1000
BEGIN_EVPROD_INFO
event producer message here
END_EVPROD_INFO
STACK_TRACE
ahafs_prod_callback+3C4
ahafs_cbfn_wrapper+30
ahafs_vn_write+204
vnop_rdwr+7E4
vno_rw+B4
rwuio+12C
rdwr+184
kewrite+16C
.svc_instr
write+1A4
_xwri

이벤트 정보가 충분히 빨리 들어오면 BUF_WRAP 항목을 연달아 두 번 받을 수 있습니다. BUF_WRAP이 보이면 (모니터 파일에 쓸 때 BUF_SIZE로) 버퍼 크기를 늘립니다.

NUM_EVDROPS_INTRCNTX

이벤트 발생 빈도가 높아 인터럽트 컨텍스트 이벤트 발생이 버려지면, 그 이벤트를 나타내는 이벤트 파일에 대한 read() 호출 출력에는 BEGIN_EVENT_INFO 키워드가 있는 줄 바로 뒤에 NUM_EVDROPS_INTRCNTX 키워드가 들어 있습니다.

다음 예는 read() 호출의 출력입니다.

text
BEGIN_EVENT_INFO
BEGIN_EVENT_INFO
NUM_EVDROPS_INTRCNTX=5508
TIME0_tvsec=1353437661
TIME0_tvnsec=75494625
TIME_tvsec=1353437661
TIME_tvnsec=741365037
SEQUENCE_NUM=6663
RC_FROM_EVPROD=0
BEGIN_EVPROD_INFO
...msg from event-producer...
END_EVPROD_INFO
END_EVENT_INFO

이 출력 예에는 다음 정보가 들어 있습니다.

  • NUM_EVDROPS_INTRCNTX=5508 값은 TIME0_tvsec과 TIME0_tvnsec 필드가 지정한 시각 이후 버려진 인터럽트 컨텍스트 이벤트 발생 수입니다.
  • 나머지 정보(곧 SEQUENCE_NUM=6663, RC_FROM_EVPROD=0, ...msg from event-producer... 등)는 TIME_tvsec과 TIME_tvnsec 필드가 지정한 시각에 일어난 이벤트에 관한 것입니다.
영어 원문

Example Event Data

For an event producer which has specified AHAFS_THRESHOLD_STATE and AHAFS_STKTRACE_AVAILABLE, and will pass a message to event consumers, the three levels of output look like this:

INFO_LVL=1 INFO_LVL=2 INFO_LVL=3
BEGIN_EVENT_INFO
TIME_tvsec=1269863383
TIME_tvnsec=455993143
SEQUENCE_NUM=0
PID=6947038
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=cat
RC_FROM_EVPROD=1000
END_EVENT_INFO BEGIN_EVENT_INFO TIME_tvsec=1269863383 TIME_tvnsec=455993143 SEQUENCE_NUM=0 PID=6947038 UID=0 UID_LOGIN=0 GID=0 PROG_NAME=cat RC_FROM_EVPROD=1000 BEGIN_EVPROD_INFO event producer message here END_EVPROD_INFO END_EVENT_INFO BEGIN_EVENT_INFO TIME_tvsec=1269863383 TIME_tvnsec=455993143 SEQUENCE_NUM=0 PID=6947038 UID=0 UID_LOGIN=0 GID=0 PROG_NAME=cat RC_FROM_EVPROD=1000 BEGIN_EVPROD_INFO event producer message here END_EVPROD_INFO STACK_TRACE ahafs_prod_callback+3C4 ahafs_cbfn_wrapper+30 ahafs_vn_write+204 vnop_rdwr+7E4 vno_rw+B4 rwuio+12C rdwr+184 kewrite+16C .svc_instr write+1A4 _xwrite+6C _xflsbuf+B0 __flsbuf+9C copyopt_ascii+2C0 scat+388 main+11C __start+68 END_EVENT_INFO

For an event producer which has specified AHAFS_THRESHOLD_VALUE_HI and has not specified AHAFS_STKTRACE_AVAILABLE, and will pass a message to event consumers, the three levels of output look like this:

INFO_LVL=1 INFO_LVL=2 INFO_LVL=3
BEGIN_EVENT_INFO
TIME_tvsec=1269866715
TIME_tvnsec=16678418
SEQUENCE_NUM=0
CURRENT_VALUE=3
RC_FROM_EVPROD=1000
END_EVENT_INFO BEGIN_EVENT_INFO TIME_tvsec=1269866715 TIME_tvnsec=16678418 SEQUENCE_NUM=0 CURRENT_VALUE=3 RC_FROM_EVPROD=1000 BEGIN_EVPROD_INFO event producer message here END_EVPROD_INFO END_EVENT_INFO BEGIN_EVENT_INFO TIME_tvsec=1269866715 TIME_tvnsec=16678418 SEQUENCE_NUM=0 CURRENT_VALUE=3 RC_FROM_EVPROD=1000 BEGIN_EVPROD_INFO event producer message here END_EVPROD_INFO END_EVENT_INFO

Error format

If there is an error from the event producer, all event producers will have the following format for all

INFO_LVL

text
BEGIN_EVENT_INFO
TIME_tvsec=1269868036
TIME_tvnsec=966708948
SEQUENCE_NUM=0
RC_FROM_EVPROD=20
END_EVENT_INFO

If a consumer is monitoring a AHAFS_THRESHOLD_VALUE event and the current value already exceeds the requested threshold, the error format will also be used to record this EALREADY event:

text
BEGIN_EVENT_INFO
TIME_tvsec=1269868036
TIME_tvnsec=966708948
SEQUENCE_NUM=0
CURRENT_VALUE=1
RC_FROM_EVPROD=56
END_EVENT_INFO

BUF_WRAP and EVENT_OVERFLOW

If unread data is overwritten by data from a new event occurrence, the keyword BUF_WRAP will be the first output from a read() on the monitor file. If there is a buffer wrap AND an event overflow, the BUF_WRAP will always come first, followed by the EVENT_OVERFLOW. Here is an example output from read() in the case where we have both a buffer wrap and an event overflow:

First read() will return:

text
BUF_WRAP

Second read() will return:

text
EVENT_OVERFLOW

Third read() will return the event data that was able to fit inside the buffer:

(25줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

If event information is coming fast enough, it is possible to receive two BUF_WRAP entries in a row. If you are seeing BUF_WRAP, increase the size of the buffer (using BUF_SIZE when writing to the monitor file).

NUM_EVDROPS_INTRCNTX

If any interrupt-context event occurrence is dropped because of a high frequency of event-occurrences, the output from a read() call on the event file, representing that event, contains the NUM_EVDROPS_INTRCNTX keyword just after the line that contains the BEGIN_EVENT_INFO keyword.

The following example represents an output from a read() call:

(13줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

This example output contains the following sets of information:

  • The NUM_EVDROPS_INTRCNTX=5508 value is the number of dropped interrupt-context event-occurrences since the time that is specified by the TIME0_tvsec and TIME0_tvnsec fields.

  • The remaining information (that is, SEQUENCE_NUM=6663, RC_FROM_EVPROD=0, ...msg from event-producer..., and so on) is about the event that occurred at the time that is specified by the TIME_tvsec and TIME_tvnsec fields.

사전 정의 이벤트 생산자

modFile

modFile 이벤트 생산자는 파일 내용 수정을 감시합니다.

개요

modFile 이벤트 생산자는 fs 디렉터리 아래에 있으며 파일 수정을 감시합니다. 감시하는 vnode 작업은 vnop_rdwr(), vnop_map_lloff(), vnop_remove(), vnop_ftrunc(), vnop_fclear(), vnop_rename()입니다. LFS 계층을 거치지 않는 수정(곧 매핑된 파일에 쓰기)은 감시할 수 없습니다.

다음 경우에는 파일을 감시할 수 없습니다.

  • 원격 파일 시스템에 있을 때
  • ahafs, procfs, namefs 형식 파일 시스템에 있을 때
  • 심볼릭 링크일 때
  • AIX 이벤트 인프라 확장자(.mon, .list, .monFactory)로 끝나는 디렉터리 아래에 있을 때
  • AIX 이벤트 인프라 가상 파일 시스템에서 전체 경로 이름이 MAXPATHLEN보다 긴 모니터 파일은 감시할 수 없습니다.

기능

text
AHAFS_THRESHOLD_STATE
AHAFS_STKTRACE_AVAILABLE
AHAFS_REMOTE_EVENT_ENABLED

반환 코드

modFile 이벤트 생산자는 sys/ahafs_evProds.h에 정의된 반환 코드를 씁니다.

이 반환 코드는 감시하는 파일이 어떻게 바뀌었는지 나타냅니다.

반환 코드 뜻
AHAFS_MODFILE_WRITE 감시하는 파일에 썼습니다.
AHAFS_MODFILE_UNMOUNT 감시하는 파일이 든 파일 시스템이 마운트 해제됐습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILE_MAP 프로세스가 감시하는 파일의 일부를 쓰기용으로 매핑했습니다.
AHAFS_MODFILE_REMOVE 감시하는 파일이 지워졌습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILE_RENAME 감시하는 파일 이름이 바뀌었습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILE_FCLEAR 프로세스가 감시하는 파일에 fclear를 냈습니다.
AHAFS_MODFILE_FTRUNC 프로세스가 감시하는 파일에 ftrunc를 냈습니다.
AHAFS_MODFILE_OVERMOUNT 감시하는 파일 위에 다른 것이 마운트됐습니다.

이벤트 생산자 메시지

이 이벤트 생산자는 이벤트 데이터에 메시지를 넘기지 않습니다.

허용되는 모니터 파일

파일 수정을 감시하려면 감시할 파일과 같은 경로의 모니터 파일을 modFile.monFactory 디렉터리 아래에 만들어야 합니다. 예를 들어 /etc/passwd를 감시하려면 모니터 파일 /aha/fs/modFile.monFactory/etc/passwd.mon을 씁니다.

이벤트 데이터 예

다음 이벤트 데이터는 감시하는 파일에 쓰는 프로세스에서 생긴 것입니다. INFO_LVL이 3일 때의 출력입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1271703118
TIME_tvnsec=409201093
SEQUENCE_NUM=0
PID=5701678
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=cat
RC_FROM_EVPROD=1000
STACK_TRACE
aha_cbfn_wrapper+30
ahafs_evprods+510
aha_vn_write+154
vnop_rdwr+7E8
vno_rw+B4
rwuio+100
rdwr+188
kewrite+104
.svc_instr
write+1A4
_xwrite+6C
_xflsbuf+A8
__flsbuf+C0
copyopt+2E8
scat+22C
main+11C
__start+68
END_EVENT_INFO
영어 원문

modFile

The modFile event producer monitors for modifications to the contents of a file.

Overview

The modFile event producer resides under the fs directory and monitors for modifications to a file. The following vnode operations are monitored: vnop_rdwr(), vnop_map_lloff(), vnop_remove(), vnop_ftrunc(), vnop_fclear() and vnop_rename(). Modifications which do not go through the LFS layer cannot be monitored (that is writes to mapped files).

Files may not be monitored if:

  • They are in a remote file system.

  • They are in file system of type ahafs, procfs or namefs.

  • They are a symbolic link.

  • They reside under a directory which ends with an AIX Event Infrastructure extension (.mon, .list, .monFactory).

  • Monitor files with a full path name larger than MAXPATHLEN in the AIX Event Infrastructure pseudo file system cannot be monitored.

Capabilities

text
AHAFS_THRESHOLD_STATE
AHAFS_STKTRACE_AVAILABLE
AHAFS_REMOTE_EVENT_ENABLED

Return codes

The modFile event producer uses return codes which are defined in <sys/ahafs_evProds.h>.

These return codes are used to indicate how the contents of the monitored directory were modified:

AHAFS_MODFILE_WRITE

The monitored file was written to.

AHAFS_MODFILE_UNMOUNT

The file system containing the monitored file was unmounted. This is an unavailable event.

AHAFS_MODFILE_MAP

A process has mapped a portion of the monitored file for writing.

AHAFS_MODFILE_REMOVE

The monitored file has been removed. This is an unavailable event.

AHAFS_MODFILE_RENAME

The monitored file has been renamed. This is an unavailable event.

AHAFS_MODFILE_FCLEAR

A process has issued an fclear for the monitored file.

AHAFS_MODFILE_FTRUNC

A process has issued an ftrunc for the monitored file.

AHAFS_MODFILE_OVERMOUNT

The monitored file has been over mounted.

Event producer message

This event producer does not pass any messages as part of its event data.

Acceptable monitor files

To monitor for file modifications, a monitor file with the same path as the file you wish to monitor should be created under the modFile.monFactory directory. For example, to monitor /etc/passwd, the monitor file /aha/fs/modFile.monFactory/etc/passwd.mon would be used.

Example event data

The following event data was generated from a process writing to a monitored file. This is the output seen with an INFO_LVL of 3:

(29줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

modFileAttr

modFileAttr 이벤트 생산자는 파일 속성 수정을 감시합니다.

개요

modFileAttr 이벤트 생산자는 fs 디렉터리 아래에 있으며 파일이나 디렉터리의 속성(모드, 소유권, ACL) 수정을 감시합니다. 감시하는 vnode 작업은 vnop_setattr()(V_OWN과 V_MODE 작업만), vnop_setacl(), vnop_setxacl(), vnop_remove(), vnop_rename(), vnop_rmdir()입니다.

다음 경우에는 파일이나 디렉터리를 감시할 수 없습니다.

  • 원격 파일 시스템에 있을 때
  • ahafs, procfs, namefs 형식 파일 시스템에 있을 때
  • AIX 이벤트 인프라 확장자(.mon, .list, .monFactory)로 끝나는 디렉터리 아래에 있을 때
  • AIX 이벤트 인프라 가상 파일 시스템에서 전체 경로 이름이 MAXPATHLEN보다 긴 모니터 파일은 감시할 수 없습니다.

기능

text
AHAFS_THRESHOLD_STATE
text
AHAFS_STKTRACE_AVAILABLE
text
AHAFS_REMOTE_EVENT_ENABLED

반환 코드

modFileAttr 이벤트 생산자는 sys/ahafs_evProds.h에 정의된 반환 코드를 씁니다.

이 반환 코드는 감시하는 파일이나 디렉터리가 어떻게 바뀌었는지 나타냅니다.

반환 코드 뜻
AHAFS_MODFILEATTR_UNMOUNT 감시하는 파일이나 디렉터리가 든 파일 시스템이 마운트 해제됐습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILEATTR_REMOVE 감시하는 파일이나 디렉터리가 지워졌습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILEATTR_RENAME 감시하는 파일이나 디렉터리 이름이 바뀌었습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILEATTR_OVERMOUNT 감시하는 파일이나 디렉터리 위에 다른 것이 마운트됐습니다. 사용 불가 이벤트입니다.
AHAFS_MODFILEATTR_SETACL 감시하는 파일이나 디렉터리의 ACL이 바뀌었습니다.
AHAFS_MODFILEATTR_SETOWN 감시하는 파일이나 디렉터리의 소유권이 바뀌었습니다.
AHAFS_MODFILEATTR_SETMODE 감시하는 파일이나 디렉터리의 모드가 바뀌었습니다.

이벤트 생산자 메시지

이 이벤트 생산자는 이벤트 데이터에 메시지를 넘기지 않습니다.

허용되는 모니터 파일

파일 속성 수정을 감시하려면 감시할 파일과 같은 경로의 모니터 파일을 modFileAttr.monFactory 디렉터리 아래에 만들어야 합니다. 예를 들어 /etc/passwd를 감시하려면 모니터 파일 /aha/fs/modFileAttr.monFactory/etc/passwd.mon을 씁니다.

이벤트 데이터 예

다음 이벤트 데이터는 감시하는 파일의 모드를 바꾸는 프로세스에서 생긴 것입니다. INFO_LVL이 3일 때의 출력입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1291994430
TIME_tvnsec=760097298
SEQUENCE_NUM=0
PID=5767216
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=chmod
RC_FROM_EVPROD=1010
STACK_TRACE
ahafs_evprods+70C
aha_process_attr+120
vnop_setattr+21C
vsetattr@AF13_1+20
setnameattr+B4
chmod+110
.svc_instr
change+3C8
main+190
__start+68
END_EVENT_INFO
영어 원문

modFileAttr

The modFileAttr event producer monitors for modifications to the attributes of a file.

Overview

The modFileAttr event producer resides under the fs directory and monitors for modifications to the attributes of a file or directory (mode, ownership and ACLs). The following vnode operations are monitored: vnop_setattr() (only for V_OWN and V_MODE operations), vnop_setacl(), vnop_setxacl(), vnop_remove(), vnop_rename() and vnop_rmdir().

Files or directories may not be monitored if:

  • They are in a remote file system

  • They are in file system of type ahafs, procfs or namefs

  • They reside under a directory which ends with an AIX Event Infrastructure extension (.mon,

.list, .monFactory)

  • Monitor files with a full path name larger than MAXPATHLEN in the AIX Event Infrastructure pseudo file system cannot be monitored.

Capabilities

text
AHAFS_THRESHOLD_STATE
text
AHAFS_STKTRACE_AVAILABLE
text
AHAFS_REMOTE_EVENT_ENABLED

Return codes

The modFileAttr event producer uses return codes which are defined in <sys/ahafs_evProds.h>.

These return codes are used to indicate how the contents of the monitored directory were modified:

AHAFS_MODFILEATTR_UNMOUNT

The filesystem containing the monitored file or directory was unmounted. This is an unavailable event.

AHAFS_MODFILEATTR_REMOVE

The monitored file or directory has been removed. This is an unavailable event.

AHAFS_MODFILEATTR_RENAME

The monitored file or directory has been renamed. This is an unavailable event.

AHAFS_MODFILEATTR_OVERMOUNT

The monitored file or directory has been over mounted. This is an unavailable event.

AHAFS_MODFILEATTR_SETACL

The ACLs of the monitored file or directory were modified.

AHAFS_MODFILEATTR_SETOWN

The ownership of the monitored file or directory was modified.

AHAFS_MODFILEATTR_SETMODE

The mode of the monitored file or directory was modified.

Event producer message

This event producer does not pass any messages as part of its event data.

Acceptable monitor files

To monitor for file modifications, a monitor file with the same path as the file you wish to monitor should be created under the modFileAttr.monFactory directory. For example, to monitor /etc/passwd, the monitor file /aha/fs/modFileAttr.monFactory/etc/passwd.mon would be used.

Example event data

The following event data was generated from a process changing the mode of a monitored file. This is the output seen with an INFO_LVL of 3:

(22줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

modDir

modDir 이벤트 생산자는 디렉터리 내용 수정을 감시합니다.

개요

modDir 이벤트 생산자는 fs 디렉터리 아래에 있으며 디렉터리 내용 수정을 감시합니다. 감시하는 vnode 작업은 vnop_create(), vnop_link(), vnop_symlink(), vnop_remove(), vnop_rename(), vnop_mkdir(), vnop_rmdir()입니다.

다음 경우에는 디렉터리를 감시할 수 없습니다.

  • 원격 파일 시스템에 있을 때
  • ahafs, procfs, namefs 형식 파일 시스템에 있을 때
  • 심볼릭 링크일 때
  • AIX 이벤트 인프라 확장자(.mon, .list, .monFactory)로 끝나는 디렉터리 아래에 있을 때
  • AIX 이벤트 인프라 가상 파일 시스템에서 전체 경로 이름이 MAXPATHLEN보다 긴 모니터 파일은 감시할 수 없습니다.

modDir 이벤트 생산자는 디렉터리 수정을 재귀적으로 감시하지 않습니다. 지정한 디렉터리의 수정만 감시합니다.

기능

text
AHAFS_THRESHOLD_STATE
AHAFS_STKTRACE_AVAILABLE
AHAFS_REMOTE_EVENT_ENABLED

반환 코드

modDir 이벤트 생산자는 sys/ahafs_evProds.h에 정의된 반환 코드를 씁니다.

이 반환 코드는 감시하는 디렉터리의 내용이 어떻게 바뀌었는지 나타냅니다.

반환 코드 뜻
AHAFS_MODDIR_CREATE 감시하는 디렉터리 아래에 새 파일 시스템 객체가 만들어졌습니다.
AHAFS_MODDIR_UNMOUNT 감시하는 디렉터리가 든 파일 시스템이 마운트 해제됐습니다. 사용 불가 이벤트입니다.
AHAFS_MODDIR_REMOVE 감시하는 디렉터리 안의 파일 시스템 객체가 지워졌습니다.
AHAFS_MODDIR_REMOVE_SELF 감시하는 디렉터리 자체가 지워지거나 이름이 바뀌었습니다. 사용 불가 이벤트입니다.

이벤트 생산자 메시지

이벤트를 일으킨 파일 시스템 객체의 이름이 이벤트 데이터에 들어갑니다.

허용되는 모니터 파일

디렉터리 내용 수정을 감시하려면 감시할 디렉터리와 같은 경로의 모니터 파일을 modDir.monFactory 디렉터리 아래에 만들어야 합니다. 예를 들어 /home/cheryl 디렉터리의 수정을 감시하려면 모니터 파일 /aha/fs/modDir.monFactory/home/cheryl.mon을 씁니다.

이벤트 데이터 예

다음 이벤트 데이터는 감시하는 디렉터리에 file1이라는 새 파일을 만들 때 생긴 것입니다. INFO_LVL이 3일 때의 출력입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1271780397
TIME_tvnsec=24369022
SEQUENCE_NUM=0
PID=6095102
UID=0
UID_LOGIN=0
GID=0
PROG_NAME=touch
RC_FROM_EVPROD=1000
BEGIN_EVPROD_INFO
file1
END_EVPROD_INFO
STACK_TRACE
aha_cbfn_wrapper+30
ahafs_evprods+510
aha_process_vnop+138
vnop_create_attr+4AC
openpnp+418
openpath+100
copen+294
kopen+1C
.svc_instr
open+F8
creat64+1C
main+1EC
__start+68
END_EVENT_INFO
영어 원문

modDir

The modDir event producer monitors for modifications to the contents of a directory.

Overview

The modDir event producer resides under the fs directory and monitors for modifications to the contents of a directory. The following vnode operations are monitored: vnop_create(), vnop_link(), vnop_symlink(), vnop_remove(), vnop_rename(), vnop_mkdir(), and vnop_rmdir().

Directories may not be monitored if:

  • They are in a remote file system

  • They are in file system of type ahafs, procfs or namefs

  • They are a symbolic link

  • They reside under a directory which ends with an AIX Event Infrastructure extension (.mon,

.list, .monFactory)

  • Monitor files with a full path name larger than MAXPATHLEN in the AIX Event Infrastructure pseudo file system cannot be monitored. The modDir event producer does not recursively monitor for directory modifications. Only modifications to the specified directory are monitored.

Capabilities

text
AHAFS_THRESHOLD_STATE
AHAFS_STKTRACE_AVAILABLE
AHAFS_REMOTE_EVENT_ENABLED

Return codes

The modDir event producer uses return codes which are defined in <sys/ahafs_evProds.h>.

These return codes are used to indicate how the contents of the monitored directory were modified:

AHAFS_MODDIR_CREATE

A new file system object has been created under the monitored directory.

AHAFS_MODDIR_UNMOUNT

The file system containing the monitored directory has been unmounted. This is an unavailable event.

AHAFS_MODDIR_REMOVE

A file system object within the monitored directory has been removed.

AHAFS_MODDIR_REMOVE_SELF

The monitored directory itself has been removed or renamed. This is an unavailable event.

Event producer message

The name of the file system object which triggered the event is included in the event data.

Acceptable monitor files

To monitor for modifications to the contents of a directory, a monitor file with the same path as the directory you wish to monitor should be created under the modDir.monFactory directory. For example, to monitor the directory /home/cheryl for modifications, the monitor file /aha/fs/modDir.monFactory/home/cheryl.mon would be used.

Example event data

The following event data was generated from a new file named file1 being created in a monitored directory. This is the output seen with an INFO_LVL of 3:

(28줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

utilFs

utilFs 이벤트 생산자는 파일 시스템 사용률을 감시합니다.

개요

utilFs 이벤트 생산자는 파일 시스템 사용률을 백분율로 감시합니다. fs 디렉터리 아래에 있습니다. 지금은 JFS2 파일 시스템만 utilFs 감시를 지원합니다. 파일 쓰기, 파일 생성, 파일 삭제 때마다 파일 시스템 사용률이 주어진 임계값에 이르렀거나 넘었는지 확인합니다. 파일 시스템 사용률에 영향을 주는 파일 시스템 고유 작업이 있을 수 있지만, utilFs는 다음 파일 쓰기, 생성, 삭제 때까지 그것을 감지하지 못할 수 있습니다. 파일 객체 삭제 결과로 넘은 임계값은 다음 파일 쓰기, 생성, 삭제 때까지 알리지 않습니다.

AHAFS에서 모니터 파일 경로 이름이 MAXPATHLEN보다 긴 파일 시스템은 감시할 수 없습니다.

이벤트 알림이 쏟아지고 성능에 영향을 주는 것을 피하려면 utilFs 이벤트는 NOTIFY_CNT를 1로 해서 감시할 것을 강하게 권장합니다.

기능

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_THRESHOLD_VALUE_LOW
AHAFS_REMOTE_EVENT_ENABLED

지정하는 임계값은 1~100이어야 합니다.

반환 코드

utilFs 이벤트 생산자는 sys/ahafs_evProds.h에 정의된 반환 코드를 씁니다.

반환 코드 뜻
AHAFS_UTILFS_THRESH_HIT 감시하는 파일 시스템이 지정한 임계값에 이르렀습니다.
AHAFS_UTILFS_UNMOUNT 감시하는 파일 시스템이 마운트 해제됐습니다. 사용 불가 이벤트입니다.

이벤트 생산자 메시지

이 이벤트 생산자는 이벤트 데이터에 메시지를 넘기지 않습니다.

허용되는 모니터 파일

파일 시스템 사용률을 감시하려면 감시할 파일 시스템의 마운트 지점과 같은 경로의 모니터 파일을 utilFs.monFactory 디렉터리 아래에 만들어야 합니다. 예를 들어 파일 시스템 /data/fs1을 감시하려면 모니터 파일 /aha/fs/utilFs.monFactory/data/fs1.mon을 씁니다.

이벤트 데이터 예

다음은 INFO_LVL이 3인 AHAFS_UTILFS_THRESH_HIT 이벤트의 이벤트 데이터입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1271705858
TIME_tvnsec=704241888
SEQUENCE_NUM=0
CURRENT_VALUE=10
RC_FROM_EVPROD=1000
END_EVENT_INFO
영어 원문

utilFs

The utilFs event producer monitors the utilization of a file system.

Overview

The utilFs event producer monitors the utilization of a file system as a percentage. It resides under the fs directory. Currently, only JFS2 file systems support utilFs monitoring. Upon every file write, file creation and file deletion, the utilization of the file system is checked to see if it meets or exceeds the given threshold. There may be some file system specific operations which can affect the utilization of the file system, but utilFs may not be able to detect them until the next file write, creation or deletion. Thresholds which are exceeded due to the result of a file object deletion will not be notified until the next file write, create or deletion.

File systems with a monitor file path name larger than MAXPATHLEN in AHAFS cannot be monitored.

To avoid a flood of event notifications and potential performance impacts, it is highly recommended that utilFs events are monitored with a NOTIFY_CNT of 1.

Capabilities

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_THRESHOLD_VALUE_LOW
AHAFS_REMOTE_EVENT_ENABLED

Thresholds specified must be between 1 and 100, inclusive.

Return codes

The utilFs event producer uses return codes which are defined in <sys/ahafs_evProds.h>.

These return codes are used to indicate how the contents of the monitored directory were modified:

AHAFS_UTILFS_THRESH_HIT

The file system being monitored has reached the threshold specified.

AHAFS_UTILFS_UNMOUNT

The file system being monitored has been unmounted. This is an unavailable event.

Event producer message

This event producer does not pass any messages as part of its event data.

Acceptable monitor files

To monitor for file system utilization, a monitor file with the same path as the mount point of the file system to be monitored should be created under the utilFs.monFactory directory. For example, to monitor the file system /data/fs1, the monitor file /aha/fs/utilFs.monFactory/data/ fs1.mon would be used.

Example event data

The following is event data from an AHAFS_UTILFS_THRESH_HIT event for an INFO_LVL of 3:

text
BEGIN_EVENT_INFO
TIME_tvsec=1271705858
TIME_tvnsec=704241888
SEQUENCE_NUM=0
CURRENT_VALUE=10
RC_FROM_EVPROD=1000
END_EVENT_INFO

waitTmCPU

waitTmCPU 이벤트 생산자는 실행 가능 스레드의 평균 대기 시간을 감시합니다.

개요

waitTmCPU 이벤트 생산자는 CPU 시간을 얻으려고 기다리는 실행 가능 스레드의 평균 대기 시간을 1초 간격으로, 밀리초 단위로 감시합니다. waitTmCPU는 cpu 디렉터리 아래에 있습니다.

기능

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_CALLBACK_INTRCNTX
AHAFS_REMOTE_EVENT_ENABLED

지정하는 임계값은 0보다 커야 합니다.

반환 코드

이 이벤트 생산자는 이벤트가 일어나면 늘 0을 돌려줍니다.

이벤트 생산자 메시지

이 이벤트 생산자는 이벤트 데이터에 메시지를 넘기지 않습니다.

허용되는 모니터 파일

이 이벤트를 감시하려면 다음 모니터 파일을 써야 합니다.

text
/aha/cpu/waitTmCPU.monFactory/waitTmCPU.mon

이 디렉터리에는 다른 모니터 파일을 만들 수 없습니다.

이벤트 데이터 예

다음은 INFO_LVL이 3인 waitTmCPU 이벤트의 이벤트 데이터입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1271779504
TIME_tvnsec=18056777
SEQUENCE_NUM=0
CURRENT_VALUE=4
RC_FROM_EVPROD=0
END_EVENT_INFO
영어 원문

waitTmCPU

The waitTmCPU event producer monitors the average wait time of runnable threads.

Overview

The waitTmCPU event producer monitors the average wait time of runnable threads waiting to get CPU time in one second intervals, measured in milliseconds. The waitTmCPU resides under the cpu directory.

Capabilities

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_CALLBACK_INTRCNTX
AHAFS_REMOTE_EVENT_ENABLED

Thresholds specified must be greater than 0.

Return codes

This event producer always returns 0 when the event occurs.

Event producer message

This event producer does not pass any messages as part of its event data.

Acceptable monitor files

To monitor this event, the following monitor file should be used:

text
/aha/cpu/waitTmCPU.monFactory/waitTmCPU.mon

No other monitor files may be created in this directory.

Example event data

The following is event data from a waitTmCPU event with an INFO_LVL of 3:

text
BEGIN_EVENT_INFO
TIME_tvsec=1271779504
TIME_tvnsec=18056777
SEQUENCE_NUM=0
CURRENT_VALUE=4
RC_FROM_EVPROD=0
END_EVENT_INFO

waitersFreePg

waitersFreePg 이벤트 생산자는 빈 프레임을 기다리는 스레드 수를 감시합니다.

개요

waitersFreePg 이벤트 생산자는 빈 프레임을 기다리는 스레드 수를 1초 간격으로 감시합니다. waitersFreePg는 mem 하위 디렉터리 아래에 있습니다.

기능

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_CALLBACK_INTRCNTX
AHAFS_REMOTE_EVENT_ENABLED

지정하는 임계값은 0보다 커야 합니다.

반환 코드

이 이벤트 생산자는 이벤트가 일어나면 늘 0을 돌려줍니다.

이벤트 생산자 메시지

이 이벤트 생산자는 이벤트 데이터에 메시지를 넘기지 않습니다.

허용되는 모니터 파일

이 이벤트를 감시하려면 다음 모니터 파일을 써야 합니다.

text
/aha/mem/waitersFreePg.monFactory/waitersFreePg.mon

이 디렉터리에는 다른 모니터 파일을 만들 수 없습니다.

이벤트 데이터 예

다음은 INFO_LVL이 3인 waitersFreePg 이벤트의 이벤트 데이터입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1271779680
TIME_tvnsec=347233732
SEQUENCE_NUM=0
CURRENT_VALUE=19843
RC_FROM_EVPROD=0
END_EVENT_INFO
영어 원문

waitersFreePg

The waitersFreePg event producer monitors the number of threads waiting for a free frame.

Overview

The waitersFreePg event producer monitors the number of threads waiting for a free frame over one second intervals. The waitersFreePg resides under the mem subdirectory.

Capabilities

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_CALLBACK_INTRCNTX
AHAFS_REMOTE_EVENT_ENABLED

Thresholds specified must be greater than 0.

Return codes

This event producer always returns 0 when the event occurs.

Event producer message

This event producer does not pass any messages as part of its event data.

Acceptable monitor files

To monitor this event, the following monitor file should be used:

text
/aha/mem/waitersFreePg.monFactory/waitersFreePg.mon

No other monitor files may be created in this directory.

Example event data

The following is event data from a waitersFreePg event with an INFO_LVL of 3:

text
BEGIN_EVENT_INFO
TIME_tvsec=1271779680
TIME_tvnsec=347233732
SEQUENCE_NUM=0
CURRENT_VALUE=19843
RC_FROM_EVPROD=0
END_EVENT_INFO

waitTmPgInOut

waitTmPgInOut 이벤트 생산자는 페이지 인이나 페이지 아웃 작업을 기다리는 스레드의 평균 대기 시간을 밀리초로 감시합니다.

개요

waitTmPgInOut 이벤트 생산자는 페이지 인이나 페이지 아웃 작업이 끝나기를 기다리는 스레드의 평균 대기 시간을 1초 기간 동안 밀리초로 감시합니다. waitTmPgInOut 이벤트 생산자는 mem 디렉터리 아래에 있습니다.

기능

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_CALLBACK_INTRCNTX
AHAFS_REMOTE_EVENT_ENABLED

지정하는 임계값은 0보다 커야 합니다.

반환 코드

이 이벤트 생산자는 이벤트가 일어나면 늘 0을 돌려줍니다.

이벤트 생산자 메시지

이 이벤트 생산자는 이벤트 데이터에 메시지를 넘기지 않습니다.

허용되는 모니터 파일

이 이벤트를 감시하려면 다음 모니터 파일을 써야 합니다.

text
/aha/mem/waitTmPgInOut.monFactory/waitTmPgInOut.mon

이 디렉터리에는 다른 모니터 파일을 만들 수 없습니다.

이벤트 데이터 예

다음은 INFO_LVL이 3인 waitTmPgInOut 이벤트의 이벤트 데이터입니다.

text
BEGIN_EVENT_INFO
TIME_tvsec=1271779359
TIME_tvnsec=941699413
SEQUENCE_NUM=0
CURRENT_VALUE=12
RC_FROM_EVPROD=0
END_EVENT_INFO
영어 원문

waitTmPgInOut

The waitTmPgInOut event producer monitors for the average wait time in milliseconds for threads waiting for a page in or page out operations.

Overview

The waitTmPgInOut event producer monitors for the average wait time in milliseconds for threads waiting for page in or page out operations to complete over a one second period. The waitTmPgInOut event producer resides under the mem directory.

Capabilities

text
AHAFS_THRESHOLD_VALUE_HIGH
AHAFS_CALLBACK_INTRCNTX
AHAFS_REMOTE_EVENT_ENABLED

Thresholds specified must be greater than 0.

Return codes

This event producer always returns 0 when the event occurs.

Event producer message

This event producer does not pass any messages as part of its event data.

Acceptable monitor files

To monitor this event, the following monitor file should be used:

text
/aha/mem/waitTmPgInOut.monFactory/waitTmPgInOut.mon

No other monitor files may be created in this directory.

Example event data

The following is event data from a waitTmPgInOut event with an INFO_LVL of 3:

text
BEGIN_EVENT_INFO
TIME_tvsec=1271779359
TIME_tvnsec=941699413
SEQUENCE_NUM=0
CURRENT_VALUE=12
RC_FROM_EVPROD=0
END_EVENT_INFO