[AIX 진단 서브시스템 18] 진단 디버깅 요령
https://archive.horanglab.com/posts/aix-diag-debug
핵심 정리
- 진단 컨트롤러는 DA의 PID로 쓸 TMInput 항목을 고릅니다. DA를 디버깅하려면
DIAG_DEBUG=1로 진단을 한 번 돌린 뒤 TMInput을odmget으로 저장하고 pid를 0으로 고쳐 다시 넣은 다음 디버거로 DA를 실행합니다. - 커널 확장이나 SLIH를 쓰는 DA는 진단을 한 번 실행해 커널 확장을 적재해 두고(종료해도 내려가지 않음)
DIAGX_SLIH_DIR=/usr/lpp/diagnostics/slih를 export합니다. - DIAGEX·PDIAGEX에는 trace 훅 355가 있습니다(bos.sysmgt.trace 필요).
trace -j 355로 대화형으로,trace -a -j 355 -L 크기 -o 파일로 백그라운드로 받고trcrpt로 보고서를 만듭니다. - 커널 디버거에서는
pdiag_cntl(DIAGEX는diag_cntl) 구조체에서 장치 핸들 목록과 내부 추적 표(dgxtraceTOP!·dgxtraceCUR!·dgxtraceBOT!)를 찾습니다. - 메모리 고정을 풀지 않고 SLIH나 커널 확장을 내리면
ff_free가 보이는 불법 트랩 인터럽트가 날 수 있습니다. - 독립형 진단 CD-ROM의 파일을 바꾸거나 디버깅하려면 패치(
/etc/diagpatch), 구성(/etc/diagconf), 디버그(/etc/NOKEYPOS) 디스켓을 씁니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (내용이 같음) |
| 원문 | Understanding the Diagnostic Subsystem for AIX — 5.3판 6장(225231쪽), 6.1판 212216쪽 |
| 명령 | odmget, odmdelete, odmadd, trace -j 355, trcrpt, trcstop |
| 환경 변수 | DIAG_DEBUG, DIAGX_SLIH_DIR |
이 절은 진단 환경에서 응용 프로그램을 디버깅하는 요령을 설명합니다.
다음 내용을 다룹니다.
영어 원문
Diagnostic debugging hints
This section has hints on how to debug applications in a Diagnostic environment.
The following areas are covered:
진단 응용 프로그램 디버깅 요령
진단 컨트롤러는 DA의 프로세스 ID(PID)로 DA가 실행 중에 쓸 TMInput 객체 클래스 항목을 정합니다.
DA를 디버깅하려면 다음을 실행합니다.
export DIAG_DEBUG=1
- 평소처럼 자원에 진단을 한 번 실행합니다.
odmget TMInput > /tmp/tminput.add # save off contents of TMInput.
/tmp/tminput.add파일을 편집해 pid 필드를 0으로 설정합니다.
odmdelete -o TMInput # delete what is currently in TMInput.
odmadd /tmp/tminput.add # add new contents of TMInput.
- DA를 대상으로 코드 디버거를 실행합니다.
진단 응용 프로그램이 커널 확장이나 2차 인터럽트 처리기(SLIH)를 쓰면, DA를 적재하고 디버깅하기 전에 다음을 해야 할 수 있습니다.
- 커널 확장을 적재합니다. 장치에 진단을 한 번 실행하고 끝내면 됩니다. 컨트롤러는 보통 DA에 필요한 커널 확장을 적재하며, 진단을 끝낼 때 확장을 내리지 않으므로 디버깅하는 동안에도 적재되어 있습니다.
- 진단 환경 변수
DIAGX_SLIH_DIR을/usr/lpp/diagnostics/slih로 export합니다.
영어 원문
Debugging hints for diagnostic applications
The Diagnostic Controller uses the process ID (PID) of the DA to determine which TMInput object class entry to use for the DA during execution.
To debug the DA, run the following:
export DIAG_DEBUG=1
- Run diagnostics as usual against your resource once.
odmget TMInput > /tmp/tminput.add # save off contents of TMInput.
- Edit the /tmp/tminput.add file and set the pid field to 0.
odmdelete -o TMInput # delete what is currently in TMInput.
odmadd /tmp/tminput.add # add new contents of TMInput.
- Execute the code debugger against the DA.
If the Diagnostic Application uses a kernel extension or Second Level Interrupt Handler, you may have to perform the following before trying to load and debug the DA.
Load the kernel extension. This can be done by running diagnostics once on the device, and then exiting. The Controller will normally load any kernel extensions needed by the DA. When exiting Diagnostics, the Controller does not unload the extensions, so it should still be loaded during the debugging,
Export the diagnostic environment variable
DIAGX_SLIH_DIRto /usr/lpp/diagnostics/slih.
진단 커널 확장 디버깅 요령
이 주제는 진단 커널 확장의 예와 디버깅 요령을 설명합니다.
영어 원문
Debugging hints for diagnostic kernel extension
This topic provides examples and debugging hints for Diagnostic Kernel Extension.
진단 커널 확장 trace 시작
진단 컨트롤러는 커널 확장이 필요한 장치마다 커널 확장을 적재합니다. 이는 장치의 PDiagRes->KernExt ODM 스탠자로 지정합니다. DIAGEX나 PDIAGEX를 쓰면 디버깅용 trace 훅이 들어 있습니다.
이 trace 훅을 쓰려면 먼저 trace 명령이 설치되어 있는지 확인해야 합니다. 이 명령은 bos.sysmgt.trace 파일 세트에 들어 있습니다.
trace를 실행하려면 다음과 같이 합니다(trace 실행 → trcon으로 시작 → 장치에 진단 실행 → trcoff로 멈춤 → quit으로 끝냄).
trace -j 355 // Invoke trace
> trcon // Start trace
> !diag -d "device_name"// Run diagnostics against the device
> trcoff // Stop trace
> quit // Quit
trace 파일을 만들려면 다음과 같이 합니다.
trcrpt -o /tmp/diagex.trc
이 trace 파일에는 진단 커널 확장이 거친 모든 단계가 들어 있습니다. 태그의 뜻을 이해하려면 소스 코드를 봐야 합니다.
영어 원문
Starting trace for diagnostic kernel extension
The Diagnostic Controller loads the Kernel Extensions for each device that requires it. This is specified by the PDiagRes->KernExt ODM stanza for the device. If using DIAGEX or PDIAGEX, there is a trace hook built in for debugging purposes.
To use this trace hook, you first must make sure that the trace command is installed. This command is part of the bos.sysmgt.trace fileset.
To run trace, perform the following:
trace -j 355 // Invoke trace
> trcon // Start trace
> !diag -d "device_name"// Run diagnostics against the device
> trcoff // Stop trace
> quit // Quit
To generate a trace file, perform the following:
trcrpt -o /tmp/diagex.trc
This trace file will contain all the steps performed by the diagnostic kernel extension. To understand the tags, you must use the source code.
진단 커널 확장 trace를 백그라운드로 실행
진단 컨트롤러는 커널 확장이 필요한 장치마다 커널 확장을 적재합니다. 이는 장치의 PDiagRes->KernExt ODM 스탠자로 지정합니다. DIAGEX나 PDIAGEX를 쓰면 디버깅용 trace 훅이 들어 있습니다.
이 trace 훅을 쓰려면 먼저 trace 명령이 설치되어 있는지 확인합니다. 이 명령은 bos.sysmgt.trace 파일 세트에 들어 있습니다.
trace를 백그라운드로 실행하려면 다음을 입력합니다.
trace -a -j 355 -L < length of file > -o < filename >
-L 플래그는 trace 로그 파일의 기본 크기 1MB를 지정한 값으로 바꿉니다. 0을 지정하면 기본 크기가 됩니다. -o 플래그는 trace 데이터를 지정한 trace 로그 파일로 출력합니다.
trace 파일을 만들려면 다음을 입력합니다.
trcrpt < filename > < output filename >
이 trace 파일에는 진단 커널 확장이 거친 모든 단계가 들어 있습니다. 태그의 뜻을 이해하려면 소스 코드를 봐야 합니다.
참고: trace는 한 번에 하나만 실행할 수 있습니다.
trace를 멈추려면 다음을 입력합니다.
trcstop
영어 원문
Running trace for diagnostic kernel extension in the background
The Diagnostic Controller loads the Kernel Extensions for each device that requires it. This is specified by the PDiagRes->KernExt ODM stanza for the device. If you are using DIAGEX or PDIAGEX, there is a trace hook built in for debugging purposes.
To use this trace hook, first make sure that the trace command is installed. This command is part of the bos.sysmgt.trace fileset.
To run trace in the background, enter:
trace -a -j 355 -L < length of file > -o < filename >
The -L flag overrides the default trace log file size of 1 MB with the value stated. Specifying a file size of zero sets the trace log file size to the default size. The -o flag outputs trace data to a specific trace log file.
To generate a trace file, enter:
trcrpt < filename > < output filename >
This trace file will contain all the steps performed by the diagnostic kernel extension. To understand the tags, you must use the source code.
Note: You can only have one trace running at a time.
To stop a trace, enter:
trcstop
알맞은 주소 찾기
커널 디버거에서는 추적 버퍼와 첫 장치 핸들의 주소를 알려 주는 구조체를 찾아볼 수 있습니다. DIAGEX에서는 diag_cntl, PDIAGEX에서는 pdiag_cntl 구조체입니다. map 명령으로 구조체의 주소를 얻습니다.
참고: 다음 예는 특정 디버거를 기준으로 합니다. 여기서 보이는 개념은 쓸 수 있는 디버거에 맞게 적용할 수 있습니다.
PDIAGEX를 예로 들면 다음과 같습니다.
- 구조체의 주소를 얻습니다.
>0> map pdiag_cntl
pdiag_cntl:0x0123F220, type:CSECT Definition
- 그 주소로 100워드를 표시합니다.
>0> d 123F220 100
0123F220 FFFFFFFF FFFFFFFF 05C8A400 00000764 |...............d|
0123F230 64677874 72616365 544F5021 21212100 |dgxtraceTOP!!!!.|
0123F240 72775F61 00000004 00000000 00000000 |rw_a............|
0123F250 67697042 00000018 00000004 2FF3B270 |gipB......../..p|
0123F260 67697064 000000C0 00000000 3D7FF018 |gipd........=...|
0123F270 67697045 00000000 3D7FF018 00000000 |gipE....=.......|
0123F280 72775F62 00000001 00000001 00000001 |rw_b............|
0123F290 72775F45 00000000 00000000 00000000 |rw_E............|
0123F2A0 52656445 00000000 20001111 00000000 |RedE.... .......|
0123F2B0 57727442 05C8A200 00000004 00000014 |WrtB............|
0123F2C0 5772742B 14000000 00000001 00000001 |Wrt+............|
0123F2D0 5772742B 00000001 0000007B 00000000 |Wrt+.......{....|
0123F2E0 72775F42 05C8A200 00000001 00000001 |rw_B............|
0123F2F0 72775F2B 00000004 00000014 00000001 |rw_+............|
0123F300 72775F2B 0000007B 14000000 00000001 |rw_+...{........|
0123F310 66685F42 05C8A200 05C8A200 00000000 |fh_B............|
- 첫째와 둘째 워드
FFFFFFFF는 잠금입니다. 무시합니다.- 셋째 워드(원문에서는 굵게 표시, 이 예에서는
05C8A400)는 장치 핸들 연결 리스트의 포인터입니다. - 넷째 워드는 내부 추적 표(trace table)의 시작입니다.
dgxtraceTOP!은 추적 표의 맨 위(TOP)를 나타냅니다.dgxtraceBOT!은 추적 표의 끝을 나타냅니다.
- 셋째 워드(원문에서는 굵게 표시, 이 예에서는
- 현재 포인터는 이 지점부터
dgxtraceCUR!를 찾으면 나옵니다.
>0> find dgxtraceCUR 123F220
01240FC0 64677874 72616365 43555221 21212121 |dgxtraceCUR!!!!!|
이 지점부터 거꾸로 거슬러 가며 지금까지 정확히 어떤 이벤트가 일어났는지 봅니다.
- 장치 핸들은 그 주소(위 2단계의 셋째 워드)에서 100워드를 표시해 장치에 연결된 데이터를 봅니다. 오른쪽 주석은 70이 슬롯 번호, C0이 버스 ID, 4가 버스 유형, 7ff800이 버스의 I/O 주소라는 뜻입니다.
>0> d 05C8A400 100
05C8A400 00000000 012438B8 00040040 0000000D |.....$8....@....|
05C8A410 00000003 000000C0 0000002C 00000000 |...........,....|
05C8A420 011759FC 05F1D000 00000000 60054335 |..Y.........`.C5|
05C8A430 00000000 00000000 00000070 000000C0 70 is slot#, C0 is bus id#
05C8A440 00000004 007FF800 00000100 00000000 4 is bus type 7ff800 is io
05C8A450 00000100 00000000 00000000 00000000 address of the bus
8번째 워드는 연결 리스트의 다음 장치 포인터입니다. 이 경우 8번째 워드가 00000000이므로 이 장치가 유일한 장치입니다.
영어 원문
Finding the right address
While in the Kernel Debugger, there is a structure that can be searched that gives the address of the trace buffer and first device handle. For DIAGEX, this structure is diag_cntl. For PDIAGEX, it is pdiag_cntl. Use the map command to get the address of the structure.
Note: The following examples are based on a particular debugger. The concepts shown can be applied using the debugger available to you.
For instance, for PDIAGEX: 1.
>0> map pdiag_cntl
pdiag_cntl:0x0123F220, type:CSECT Definition
- Use that address and display 100 words:
(17줄짜리 예는 위 한글 본문에 그대로 실었습니다.)
The first and second words,
FFFFFFFF, are locks. Ignore them.The third word (in bold) is a pointer to the linked list of device handles.
The fourth word is the start of the internal trace table.
dgxtraceTOP!defines the TOP of the trace table.dgxtraceBOT!defines the end of the trace table.
- The current pointer can be found by searching from this point for
dgxtraceCUR!:
>0> find dgxtraceCUR 123F220
01240FC0 64677874 72616365 43555221 21212121 |dgxtraceCUR!!!!!|
Work backwards from this point to see exactly what events have taken place to this point.
- As far as the device handles are concerned, display 100 words to see the data associated with the device at that address (the third word from 2.b above):
>0> d 05C8A400 100
05C8A400 00000000 012438B8 00040040 0000000D |.....$8....@....|
05C8A410 00000003 000000C0 0000002C 00000000 |...........,....|
05C8A420 011759FC 05F1D000 00000000 60054335 |..Y.........`.C5|
05C8A430 00000000 00000000 00000070 000000C0 70 is slot#, C0 is bus id#
05C8A440 00000004 007FF800 00000100 00000000 4 is bus type 7ff800 is io
05C8A450 00000100 00000000 00000000 00000000 address of the bus
The 8th word is a pointer to the next device in the linked list. In this case the 8th word is 00000000, indicating this is the only device.
불법 트랩 살펴보기
어떤 응용 프로그램이 메모리 고정(pin)을 먼저 풀지 않고 SLIH나 커널 확장을 내리면 불법 트랩 명령(Illegal Trap Instruction)이 일어날 수 있습니다. 끝낼 때 진단 커널 확장의 close 루틴을 부르지 않아도 일어날 수 있습니다.
디버거가 켜져 있을 때 이런 일이 생기면 다음과 비슷한 화면이 나타날 수 있습니다. 덤프에 ff_free가 보이면 어떤 응용 프로그램이 코드를 내리기 전에 고정을 풀지 않았다는 표시입니다.
ff_free에 넘긴 주소는 r29나 r30에 있습니다. (s)creen 명령으로 낯익은 함수 이름이 보일 때까지 거슬러 올라갑니다. 다음 예에서는 SLIH mps_interrupt가 드러났습니다.
- 불법 트랩 화면입니다.
GPR0 00000000 2FF3B188 00192DF0 00000016 007FFFFF C0000000 00009030 2FF3B400
GPR8 00000000 00000000 00000000 00000010 0014032C DEADBEEF DEADBEEF DEADBEEF
GPR16 DEADBEEF DEADBEEF 200004B0 DEADBEEF DEADBEEF DEADBEEF 2FF3B2C0 00000000
GPR24 00000000 00161BF8 C0000420 03762428 0015FF40 01A1C5A0 01A1C5A8 0015FF40
MSR 00029030 CR 44224828 LR 0014032C CTR 000908A8 MQ 00000000
XER 00000000 SRR0 00140334 SRR1 00029030 DSISR 40000000 DAR 00000000
IAR 00140334 (ORG+00140334) ORG=00000000 Mode: VIRTUAL
00140330 5400D97E 0C800000 387F0000 4BECADC5 |T..~....8...K...|
tweqi r0,0x0
00140340 81810058 30210050 7D8803A6 BBA1FFF4 |...X0!.P}.......|
00140330 5400D97E 0C800000 387F0000 4BECADC5 |T..~....8...K...|
00140340 81810058 30210050 7D8803A6 BBA1FFF4 |...X0!.P}.......|
00140350 4E800020 00000000 00002041 80030100 |N.. ...... A....|
00140360 00000000 00000174 00076666 5F667265 |.......t.. ff_fre |
00140370 65000000 80E20328 BF81FFF0 7C0802A6 | e ......(....|...|
00140380 2C070000 90010008 9421FFB0 3B830000 |,........!..;...|
00140390 41820050 80E201E8 38640000 83810040 |A..P....8d.....@|
Illegal Trap Instruction Interrupt in Kernel
>0>
- (s)creen으로 R29의 내용을 표시합니다.
>0> s 1A1C5a0 100
GPR0 00000000 2FF3B188 00192DF0 00000016 007FFFFF C0000000 00009030 2FF3B400
GPR8 00000000 00000000 00000000 00000010 0014032C DEADBEEF DEADBEEF DEADBEEF
GPR16 DEADBEEF DEADBEEF 200004B0 DEADBEEF DEADBEEF DEADBEEF 2FF3B2C0 00000000
GPR24 00000000 00161BF8 C0000420 03762428 0015FF40 01A1C5A0 01A1C5A8 0015FF40
MSR 00029030 CR 44224828 LR 0014032C CTR 000908A8 MQ 00000000
XER 00000000 SRR0 00140334 SRR1 00029030 DSISR 40000000 DAR 00000000
IAR 00140334 (ORG+00140334) ORG=00000000 Mode: VIRTUAL
00140330 5400D97E 0C800000 387F0000 4BECADC5 |T..~....8...K...|
tweqi r0,0x0
00140340 81810058 30210050 7D8803A6 BBA1FFF4 |...X0!.P}.......|
01A1C5A0 01A29850 0000A518 01DF0004 325E9F94 |...P........2^..|
01A1C5B0 00000000 00000000 00481007 010B0001 |.........H......|
01A1C5C0 00000BF0 0000010C 00000000 000000E4 |................|
01A1C5D0 00000000 00000000 000000F0 00020001 |................|
01A1C5E0 00020002 00040003 00020003 314C0000 |............1L..|
01A1C5F0 00000000 00000000 00000000 00000000 |................|
01A1C600 00000000 2E746578 74000000 00000000 |.....text.......|
- 함수 이름이 나올 때까지 Enter를 누릅니다.
>0> enter several times
GPR0 00000000 2FF3B188 00192DF0 00000016 007FFFFF C0000000 00009030 2FF3B400
GPR8 00000000 00000000 00000000 00000010 0014032C DEADBEEF DEADBEEF DEADBEEF
GPR16 DEADBEEF DEADBEEF 200004B0 DEADBEEF DEADBEEF DEADBEEF 2FF3B2C0 00000000
GPR24 00000000 00161BF8 C0000420 03762428 0015FF40 01A1C5A0 01A1C5A8 0015FF40
MSR 00029030 CR 44224828 LR 0014032C CTR 000908A8 MQ 00000000
XER 00000000 SRR0 00140334 SRR1 00029030 DSISR 40000000 DAR 00000000
IAR 00140334 (ORG+00140334) ORG=00000000 Mode: VIRTUAL
00140330 5400D97E 0C800000 387F0000 4BECADC5 |T..~....8...K...|
tweqi r0,0x0
00140340 81810058 30210050 7D8803A6 BBA1FFF4 |...X0!.P}.......|
01A1CDF0 41820010 306300CC 48000479 80410014 |A...0c..H..y.A..|
01A1CE00 38600000 4800000C 3860FFFF 48000004 |8`..H...8`..H...|
01A1CE10 80010088 7C0803A6 30210080 BBC1FFF8 |....|...0!......|
01A1CE20 4E800020 00000000 00002041 80020201 |N.. ...... A....|
01A1CE30 00000000 00000780 000D6D70 735F696E |.......... mps_in |
01A1CE40 74657272 75707400 00000000 BDA1FFB4 | terrupt .........|
01A1CE50 80A20004 39C30000 80650060 7C0802A6 |....9....e.`|...|
영어 원문
Looking at an illegal trap
In some instances, an Illegal Trap Instruction may occur if some application unloads their SLIH or kernel extension, without having previously unpinned its memory. This can also happen if the Diagnostic Kernel Extension close routine is not called on exit.
If this happens when the debugger is enabled, a screen similar to the following may appear. The appearance of ff_free in the dump is the indicator that an application did not unpin some code before unloading.
The address passed to ff_free is in (r29) or r30. Use the (s)creen command to trace back until you see a familiar function name. In the following example, the SLIH mps_interrupt was indicated. 1.
(19줄짜리 예는 위 한글 본문에 그대로 실었습니다.)
- Use (s)creen to display contents of R29:
(18줄짜리 예는 위 한글 본문에 그대로 실었습니다.)
- Press enter until you find a function name:
(18줄짜리 예는 위 한글 본문에 그대로 실었습니다.)
진단 패치 디스켓 절차
진단 패치 디스켓은 CD-ROM의 파일 대신 디스켓의 파일로 바꿔 쓸 수 있게 하는 것이 목적입니다.
진단 CD-ROM으로 진단을 실행할 때 생기는 문제를 디버깅하는 데 도움이 되도록 패치 디스켓을 만들 수 있습니다. 쓸 수 있는 디스켓은 세 가지입니다(진단 구성 디스켓, 진단 패치 디스켓, 진단 디버그 디스켓).
모든 디스켓은 backup/restore 형식입니다. 진단 디버그 디스켓은 다른 두 디스켓과 합쳐, 파일을 바꾸면서 명령줄 디버깅도 할 수 있게 할 수 있습니다.
영어 원문
Diagnostic patch diskette procedure
The Diagnostic Patch Diskette purpose is to allow file replacement from diskette, overriding the file(s) on the CDROM.
Patch diskettes can be made to help in the debug of problems that occur when running diagnostics from the Diagnostic CDROM. Three types of diskettes can be used:
All diskettes are in backup or restore format. The Diagnostic Debug diskette can be combined with the other two to allow command line debugging as well as file replacement.
진단 구성 디스켓
진단 구성 디스켓의 주된 목적은 두 가지입니다.
첫째는 그래픽 어댑터의 화면 재생률(refresh rate)을 기본값과 다른 값으로 설정하는 것입니다. 기본값은 60Hz입니다. 그래픽 디스플레이의 재생률이 77Hz면 재생률을 77로 설정합니다.
둘째는 아무 RS232나 RS422 어댑터에 붙은 터미널을 콘솔 장치로 고를 수 있게 하는 것입니다. 기본 장치는 첫 표준 직렬 포트(S1)에 붙은 RS232 tty입니다.
어느 쪽이든 사용자 정의 구성 디스켓 만들기(Create Customized Configuration Diskette) 작업으로 할 수 있습니다.
올바른 진단 구성 디스켓에는 다음 파일이 들어 있습니다.
./.signature./CONSDEF./REFRESH
.signature 파일에는 디스켓의 목적을 설명하는 한 줄이 들어 있습니다. 이 디스켓의 설명은 /etc/diagconf여야 합니다.
영어 원문
Diagnostic configuration diskette
The Diagnostic Configuration diskette has two main purposes.
The first purpose of the Diagnostic Configuration diskette is to allow the refresh rate of the graphics adapter to be set to a different value than the default. The default value is 60Hz. If the graphics display's refresh rate is 77 Hz, then set the refresh rate to 77.
The second purpose of the Diagnostic Configuration diskette is to allow a terminal attached to any RS232 or RS422 adapter to be selected as a console device. The default device is a RS232 tty attached to the first standard serial port(S1).
Each of these can be accomplished by using the Create Customized Configuration Diskette Task.
A valid Diagnostic Configuration Diskette contains the following files: • ./.signature • ./CONSDEF • ./REFRESH
The .signature file contains a single line describing the diskette purpose. For this diskette, the description should be /etc/diagconf.
진단 패치 디스켓
진단 패치 디스켓은 새 진단 CD-ROM이 나올 때까지 실패하는 응용 프로그램을 고치는 데 씁니다. 개발 중에 특정 응용 프로그램이 왜 실패하는지 디버깅하는 데 쓸 수도 있습니다.
올바른 진단 패치 디스켓에는 다음 파일이 들어 있습니다.
./.signature./etc/diagpatch./etc/[applications]
.signature 파일에는 디스켓의 목적을 설명하는 한 줄이 들어 있으며, 이 디스켓의 설명은 /etc/diagpatch여야 합니다. /etc/diagpatch 파일은 Korn 셸 스크립트로, 먼저 RAM 파일 시스템에서 응용 프로그램을 지운 다음 새 응용 프로그램을 옛 위치에 링크합니다. /etc/diagpatch 파일은 실행할 수 있어야 합니다. 예는 다음과 같습니다.
#!/bin/ksh
#### begin diagpatch
# Files to be replaced on the RAM file system must first be removed,
# then linked from /etc to /usr/lpp/....[or correct location]
### Replacing a diagnostic application
rm /usr/lpp/diagnostics/da/dxspa
ln -s /etc/dxspa /usr/lpp/diagnostics/da/dxspa
영어 원문
Diagnostic patch diskette
The Diagnostic Patch diskette is used to patch failing applications until a new release of the Diagnostic CDROM is available. This diskette may also be used in development to help in the debug of why a particular application is failing.
A valid Diagnostic Patch Diskette contains the following files: • ./.signature • ./etc/diagpatch • ./etc/[applications]
The .signature file contains a single line describing the diskette purpose. For this diskette, the description should be /etc/diagpatch. The /etc/diagpatch file is a Korn shell script file that is used to remove the application first from the RAM file system, then links the new application to the old one. The /etc/diag
patch file must be executable. Following is an example
#!/bin/ksh
#### begin diagpatch
# Files to be replaced on the RAM file system must first be removed,
# then linked from /etc to /usr/lpp/....[or correct location]
### Replacing a diagnostic application
rm /usr/lpp/diagnostics/da/dxspa
ln -s /etc/dxspa /usr/lpp/diagnostics/da/dxspa
진단 디버그 디스켓
올바른 진단 디버그 디스켓에는 ./.signature와 ./etc/NOKEYPOS 파일이 들어 있습니다.
.signature 파일에는 디스켓의 목적을 설명하는 한 줄이 들어 있습니다. 이 디스켓의 설명은 /etc/diagpatch나 /etc/diagconf 가운데 하나일 수 있습니다. 파일을 바꾸지 않으면 스크립트 파일은 없어도 됩니다.
/etc/NOKEYPOS 파일은 길이가 0인 파일입니다.
참고: 패치 디스켓이나 구성 디스켓에 /etc/NOKEYPOS 파일만 더하면 이 기능을 그 디스켓과 합칠 수 있습니다.
영어 원문
Diagnostic debug diskette
A valid Diagnostic Debug Diskette contains the following files: ./.signature, ./etc/NOKEYPOS.
The .signature file contains a single line describing the diskette purpose. For this diskette, the description could be either /etc/diagpatch or /etc/diagconf. The script file does not need to be present if files are not being replaced.
The /etc/NOKEYPOS file is a zero length file.
Note: This function can be combined with either the Patch or Configuration diskette by simply adding the /etc/NOKEYPOS file to either diskette.
관련 글: 진단 커널 확장 (1), 진단 객체 클래스, 코드 예