[AIX 진단 서브시스템 17] 진단 기능과 패키징

핵심 정리

  • 빠진 옵션 해결: 디스크에서 부팅할 때마다 이전 IPL의 CuDv와 지금 감지한 자원을 비교해 MISSING·NEW를 표시합니다(CuDv chgstatus). 일반 부팅이면 콘솔에 "Run diag -a"가 나오고, diag -a(고급 모드는 -A)로 처리합니다. 온라인 서비스 모드는 자동으로 실행하고, 독립형 진단은 비교할 이전 구성이 없어 NEW RESOURCES 메뉴만 보입니다.
  • 오류 로그 분석(ELA)은 자원을 시험하지 않고 오류 로그를 분석합니다. 자동(diagela), 주기 진단, diag -e, 문제 판별 모드(최근 24시간의 영구 하드웨어 오류) 네 가지 방법이 있습니다.
  • 주기 진단: diagd 데몬이 CDiagAtt의 p_test_time(9999면 시험 안 함)을 보고 깨어나 diagela -t를 실행합니다. 물리 위치 코드가 없는(공유·가상) 프로세서는 지원하지 않으며, System p5는 AIX 프로세서 진단과 주기 진단을 지원하지 않습니다.
  • 자동 ELA(diagela)는 영구 하드웨어 오류가 기록될 때마다 실행되며 기본으로 켜져 있습니다. PDiagAtt의 diag_notify, diag_analyze 속성으로 사용자 알림·분석 프로그램을 등록할 수 있습니다.
  • 패키징: bos.diag.rte(컨트롤러), bos.diag.util(서비스 보조·작업), bos.diag.com(라이브러리, 커널 확장, 헤더). DA는 /usr/lpp/diagnostics/da, SLIH는 .../slih, TU 라이브러리는 .../lib, 보고서는 /etc/lpp/diagnostics/data에 있습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (내용이 같음)
원문 Understanding the Diagnostic Subsystem for AIX — 5.3판 45장(211225쪽), 6.1판 200~212쪽
명령 diag -a, diag -c -e -d, /usr/lpp/diagnostics/bin/diagela ENABLE, diagela DISABLE
파일 세트 bos.diag.rte, bos.diag.util, bos.diag.com, devices.<type>.<deviceid>.diag

이 주제는 진단 기능을 설명합니다.

영어 원문

Diagnostic features

This topic describes the diagnostic features.

빠진 옵션 해결

이 절은 시스템 구성의 변화를 감지했을 때 진단이 수행하는 빠진 옵션 해결(Missing Options Resolution) 절차를 설명합니다. 이 절차는 시스템 구성 데이터베이스를 정리하거나, 앞서 감지한 자원을 운영 체제가 더는 찾지 못하는 이유를 알아내려고 실행할 수 있습니다.

설치된 하드 파일(디스크)에서 시스템을 부팅할 때마다, 이전 IPL에서 하드 파일에 저장한 장치 구성 데이터베이스(CuDv)와 이번 IPL에서 감지한 자원을 비교합니다. 이전 IPL에서는 찾았지만 이번에는 찾지 못한 감지 가능 자원은 MISSING으로 표시합니다. 이번 IPL에서 찾았지만 이전 IPL에는 없던 장치는 NEW로 표시합니다.

자원마다 사용자 정의 장치 항목 CuDv의 chgstatus 필드에 바뀐 상태를 설정합니다. 이 상태 값은 /usr/include/sys/cfgdb.h 파일에 있습니다.

일반 모드로 시스템을 부팅할 때 MISSING으로 감지된 장치가 있으면 콘솔에 다음 메시지를 씁니다.

text
A device that was previously detected could not be found.
Run diag -a to update the system configuration.

그러면 diag -a 명령으로 빠진 옵션 해결 절차를 처리할 수 있습니다.

온라인 서비스 모드로 부팅할 때는 빠진 장치가 감지되면 빠진 옵션 해결 절차가 자동으로 실행됩니다.

다음 절들은 빠진 옵션 처리 중에 불리는 진단 응용 프로그램에 진단 컨트롤러가 정보를 어떻게 넘기는지 설명합니다.

영어 원문

Missing Options Resolution

This section describes the Missing Options Resolution Procedure performed by Diagnostics when a change in the system configuration has been detected. This procedure can be run to clean up the system configuration database, or to determine why previously detected resources are no longer found by the operating system.

Each time the system boots from an installed hardfile, the device configuration database (CuDv) that is stored on the hardfile from the previous IPL is compared against the resources detected on the current IPL. Detectable resources that were found on the previous IPL but not the current IPL are marked as MISSING. Devices that were found on the current IPL, but not present in the previous IPL are marked as NEW.

The customized device entry CuDv chgstatus field is set to the changed status for each resource. These changed status values can be found in /usr/include/sys/cfgdb.h file.

When booting a system in normal mode, a message is written to the console if any devices have been detected as MISSING. This message states:

text
A device that was previously detected could not be found.
Run diag -a to update the system configuration.

The diag -a command can then be run to process the missing options resolution procedure.

When booting a system in online service mode, the missing options resolution procedure is run automatically if any missing devices were detected.

The following sections describe how the Diagnostic Controller presents information to the Diagnostic Applications that get invoked during Missing Options.

온라인 동시 진단

빠진 옵션 해결 절차는 다음 명령으로 온라인 동시 모드에서 실행할 수 있습니다.

text
% diag -a       # 고객 모드로 실행
% diag -a -A    # 고급 모드로 실행

사용자가 처음 보는 화면은 빠진 자원(MISSING RESOURCE) 메뉴 801020입니다.

다음은 diag -a 명령을 실행할 때 진단 응용 프로그램에 넘어가는 TMInput의 예입니다.

text
TMInput:
        exenv = 4               // Concurrent Environment
        advanced = 0            // Customer Mode
        system = 0              // Option Checkout
        dmode = 4               // System Verification
        date = "-s START -e NOW"// START = NOW - 24 hours.
        loopmode = 1            // Not in Loop Mode
        lcount = 0
        lerrors = 0
        console = 1             // Console Available
        parent = "parent0"      // Parent of resource to test
        parentloc = "AB-CD"     // Parent’s Location Code
        dname = "resource0"     // Name of resource to test
        dnameloc = "AB-CD"      // Resource’s Location Code
        child1 = "child0"       // Missing Child of Resource
        state1 = 3              // State of Child is MISSING
        childloc1 = "AB-CD"     // Child’s Location Code
        child2 = ""
        state2 = 0
        childloc2 = ""

다음은 diag -a -A 명령을 실행할 때 진단 응용 프로그램에 넘어가는 TMInput의 예입니다.

text
TMInput:
        exenv = 4               // Concurrent Environment
        advanced = 1            // Advanced Mode
        system = 0              // Option Checkout
        dmode = 4               // System Verification
        date = "-s START -e NOW"// START = NOW - 24 hours.
        loopmode = 1            // Not in Loop Mode
        lcount = 0
        lerrors = 0
        console = 1             // Console Available
        parent = "parent0"      // Parent of resource to test
        parentloc = "AB-CD"     // Parent’s Location Code
        dname = "resource0"     // Name of resource to test
        dnameloc = "AB-CD"      // Resource’s Location Code
        child1 = "child0"       // Missing Child of Resource
        state1 = 3              // State of Child is MISSING
        childloc1 = "AB-CD"     // Child’s Location Code
        child2 = ""
        state2 = 0
        childloc2 = ""
영어 원문

Online Concurrent Diagnostics

Missing Options Resolution procedure can be run in online concurrent mode by using the following command:

% diag -a // Runs in Customer Mode OR % diag -a -A // Runs in Advanced Mode

The first screen seen by the user is the MISSING RESOURCE Menu, 801020.

The following TMInput is an example of the input given to the Diagnostic Application when running the diag -a command.

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

The following TMInput is an example of the input given to the Diagnostic Application when running the diag -a -A command.

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

온라인 서비스 진단

온라인 서비스 모드에서는 기능 선택(FUNCTION SELECTION) 메뉴에서 Diagnostics or Advanced Diagnostics를 고르면 빠진 옵션 해결 절차가 자동으로 실행됩니다.

온라인 서비스 모드로 부팅하면 서비스 모드 부팅 스크립트가 1단계에서 운영 안내(OPERATING INSTRUCTIONS) 메뉴와 기능 선택 메뉴를 표시합니다. 선택하면 그 선택을 /etc/lpp/diagnostics/data/fastdiag 파일에 저장하고 부팅 과정의 2단계가 시작됩니다.

기능 선택 메뉴에서 Diagnostic Routines를 고른 뒤 빠진 자식 자원 때문에 불리는 진단 응용 프로그램은 다음 TMInput을 받습니다.

text
TMInput:
        exenv = 2               // Standalone Environment
        advanced = 0            // Customer Mode
        system = 0              // Option Checkout
        dmode = 4               // System Verification
        date = "-s START -e NOW"// START = NOW - 24 hours.
        loopmode = 1            // Not in Loop Mode
        lcount = 0
lerrors = 0
console = 1             // Console Available
parent = "parent0"      // Parent of resource to test
parentloc = "AB-CD"     // Parent’s Location Code
dname = "resource0"     // Name of resource to test
dnameloc = "AB-CD"      // Resource’s Location Code
child1 = "child0"       // Missing Child of Resource
state1 = 3              // State of Child is MISSING
childloc1 = "AB-CD"     // Child’s Location Code
child2 = ""
state2 = 0
childloc2 = ""

기능 선택 메뉴에서 Advanced Diagnostic Routines를 고른 뒤 빠진 자식 자원 때문에 불리는 진단 응용 프로그램은 다음 TMInput을 받습니다.

text
TMInput:
        exenv = 2               // Standalone Environment
        advanced = 1            // Advanced Mode
        system = 0              // Option Checkout
        dmode = 4               // System Verification
        date = "-s START -e NOW"// START = NOW - 24 hours.
        loopmode = 1            // Not in Loop Mode
        lcount = 0
        lerrors = 0
        console = 1             // Console Available
        parent = "parent0"      // Parent of resource to test
        parentloc = "AB-CD"     // Parent’s Location Code
        dname = "resource0"     // Name of resource to test
        dnameloc = "AB-CD"      // Resource’s Location Code
        child1 = "child0"       // Missing Child of Resource
        state1 = 3              // State of Child is MISSING
        childloc1 = "AB-CD"     // Child’s Location Code
        child2 = ""
        state2 = 0
        childloc2 = ""
영어 원문

Online Service Diagnostics

Missing Options Resolution procedure is run automatically in online service mode when Diagnostics or Advanced Diagnostics selection is made from the FUNCTION SELECTION Menu.

When booting a system in online service mode, the OPERATING INSTRUCTIONS Menu and the FUNCTION SELECTION Menu are displayed in phase 1 by the service mode boot script. Once a selection is made, the selection is stored in /etc/lpp/diagnostics/data/fastdiag file, and phase 2 of the boot process commences.

The Diagnostic Application that gets called due to a missing child resource, after selecting Diagnostic Routines from the FUNCTION SELECTION menu, gets a TMInput shown below:

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

The Diagnostic Application that gets called due to a missing child resource, after selecting Advanced Diagnostic Routines from the FUNCTION SELECTION menu, gets a TMInput shown below:

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

독립형 진단(POWER 프로세서 기반만)

독립형(Standalone) 진단 중에는 빠진 옵션 해결 절차를 실행하지 않습니다. 부팅 때 감지한 새 장치와 비교할 이전 구성 데이터베이스가 진단 컨트롤러에 없기 때문입니다.

그래서 독립형 진단 중에는 새 자원(NEW RESOURCES) 메뉴만 보입니다. 이 메뉴는 독립형 진단을 부팅한 때 시스템에서 찾은 모든 자원의 목록을 보여 줍니다.

이때 사용자에게 몇 가지 선택지가 주어집니다. 시스템에 ISA 어댑터가 있으면 목록에 나타나지 않습니다. ISA 어댑터는 감지할 수 없으므로, 이 어댑터의 구성을 돕는 옵션을 사용자에게 보여 줍니다.

영어 원문

Standalone Diagnostics (POWER® processor-based only)

Missing Options Resolution procedure is not run during Standalone Diagnostics. The reason for this is that there is no previous configuration database for the Diagnostic Controller to compare against with the new devices detected at boot time.

Therefore, only the NEW RESOURCES menu is seen during Standalone Diagnostics. This menu presents a list of all the resources found in the system at the time the Standalone Diagnostics were booted.

The user is given a list of choices to make during this time. If the system contains ISA adapters, then these adapters will not appear in the list. ISA adapters are not detectable, therefore an option is presented to the user to help in the configuration of these adapters.

빠진 옵션 절차의 단계

빠진 옵션 절차를 실행할 때 진단 컨트롤러가 거치는 단계입니다.

  1. 진단 컨트롤러는 사용자 정의 장치(CuDv) 객체 클래스에 나타난, 시스템에서 찾은 모든 자원의 정렬된 목록을 유지합니다. 이 목록을 훑어 MISSING으로 표시된 자원을 모두 찾습니다.
  2. MISSING 장치 전체에 대해 빠진 장치(Missing Device) 메뉴를 보여 줍니다. 이 메뉴는 빠진 장치마다 그 자식 장치를 몇 칸 들여 써서 나열합니다. 빠진 옵션 해결 절차는 부모도 함께 빠지지 않은 빠진 장치에만 할 수 있습니다. 메뉴의 예는 빠진 자원 메뉴를 봅니다.
  3. 장치를 고르면 빠진 장치 해결 메뉴를 보여 줍니다. 이 메뉴는 장치를 옮겼는지, 뺐는지, 껐는지 묻습니다. 다음 가운데 고를 수 있습니다.
      1. The resource has NOT been removed from the system, moved to another location or address, or turned off. This selection will determine why the resource was not detected.(자원을 빼거나 옮기거나 끄지 않음. 왜 감지되지 않았는지 알아냄)
      1. 빠진 장치까지의 경로를 시험합니다.
      2. 경로의 장치에 결함이 있으면, 방금 이름이 나온 장치에 의존하지 않는 목록의 다음 "빠진" 장치로 건너뜁니다. 경로의 결함 장치는 진단 응용 프로그램(DA)이 FRU 버킷 객체 클래스에 더해 둔 상태입니다.
      3. 빠진 장치 메뉴를 보여 준 단계로 돌아갑니다.
      4. EnclDAName DA가 지정되어 있으면 부릅니다.
      5. 문제를 감지했으면 부모가 다른 목록의 다음 빠진 장치로 건너뛰고, 빠진 장치 메뉴를 보여 준 단계로 돌아갑니다.
      6. 빠진 장치 절차를 지정했으면(suptests & SUPTESTS_MS1) 부릅니다. DA는 문제가 있다고 결론을 내야 합니다.
      7. 현재 빠진 장치에 의존하지 않는 목록의 다음 빠진 장치로 건너뜁니다.
      8. 빠진 장치 메뉴를 보여 준 단계로 돌아갑니다.
      9. 빠진 장치 절차를 지정하지 않았으면 addfrub 서브루틴으로 장치를 FRU 버킷 객체 클래스에 더합니다. 기본 정보는 사전 정의 장치(PdDv) 객체 클래스에서 얻습니다.
      1. The resource has been removed from the system and should be removed from the system configuration.(자원을 시스템에서 뺐으며 구성에서도 지워야 함)
      1. 빠진 장치의 DA가 빠진 장치 절차 2(suptests==SUPTESTS_MS2)를 지원하면 DA를 부릅니다. 진단 컨트롤러는 장치를 시스템 구성에서 자동으로 지우지 않습니다.
      2. 그렇지 않으면 장치에 지울 표시를 합니다.
      1. The resource has been moved to another location and should be removed from the system configuration.(자원을 다른 위치로 옮겼으며 구성에서 지워야 함)
      1. 사용자가 빠진 장치를 어디로 옮겼는지 알아볼 수 있도록 같은 유형의 새 장치 목록을 보여 줍니다. 장치가 새 위치에서 감지되지 않은 경우를 위해 "Not Listed" 기본 선택을 넣어야 하며, 이때는 기본 서비스 요청 번호(SRN)를 만들어야 합니다.
      2. 사용자가 새 위치를 알려 주었다고 하면 다음을 합니다.
          1. 빠진 장치에 감지할 수 없는 자식이 있으면, 자식을 새 장치로 다시 구성할지 묻는 메뉴를 보여 줍니다. 메뉴에는 모든 장치를 한꺼번에 고르는 선택 하나와 장치마다의 선택을 둡니다. 장치를 고르면 parent 필드를 바꾸고 장치를 구성합니다. 장치 구성에는 mkdev 명령을 씁니다.
          1. 빠진 장치와, 다시 구성하지 않은 자식을 지웁니다.
      1. The resource has been turned off and should be removed from the system configuration.(자원을 껐으며 구성에서 지워야 함)
      1. 장치에 구성 데이터베이스에서 지울 표시를 합니다.
      1. The resource has been turned off but should remain in the system configuration.(자원을 껐지만 구성에는 남겨야 함)
      1. 아무것도 하지 않습니다.
  4. 빠진 장치를 모두 위 선택 가운데 하나로 처리하면 다음을 합니다.
      1. 찾은 문제를 보고합니다.
      1. 앞서 지울 표시를 한 장치를 지웁니다.
      1. 새 자원이 더해졌으면 새 장치 목록을 보여 주고 목록이 맞는지 사용자에게 묻습니다. 예면 끝냅니다. 아니요면 일부 새 장치가 감지되지 않았음을 나타내는 사전 정의 SRN을 표시하고 끝냅니다.
영어 원문

Missing Options Procedure Steps

Use the topic to view the steps performed by the Diagnostic Controller when running the Missing Options Procedure.

  1. The Diagnostic Controller keeps a sorted list of all resources found in the system as represented by the Customized Device object class. This list is walked finding all resources that are tagged as MISSING.

  2. Present the Missing Device menu for all MISSING devices. This menu lists each missing device with any children devices indented a few spaces. Missing Options Resolution Procedure can only be performed on the missing devices that do not have a parent also missing. See MISSING RESOURCE Menu for an example of this menu.

  3. After selection of a device, present the Missing Device Resolution menu. The menu asks the user if the device was moved, removed, or turned off. The following selections may be chosen:

  1. The resource has NOT been removed from the system, moved to another location or address, or turned off. This selection will determine why the resource was not detected. 1) Test the path to the missing device. 2) If a device in the path is defective, then skip to the next "missing" device in the list that is not dependent on the one just named. Note that the defective device in the path has been added to the FRU Bucket object class by the Diagnostic Application (DA). 3) Return to the step where the missing device menu was presented. 4) If an EnclDAName DA is named, call it. 5) If a problem was detected, skip to the next missing device in the list that has a different parent, and return to the step where the Missing Device menu was presented. 6) If a missing device procedure was specified (suptests & SUPTESTS_MS1), then call it. Note that the DA should conclude that there is a problem. 7) Skip to the next missing device in the list that is not dependent on the current missing device. 8) Return to the step where the Missing Device menu was presented. 9) If a missing device procedure was not specified, then add the device to the FRU Bucket object class by the addfrub subroutine. The default information is obtained from the Predefined Device object class. b. The resource has been removed from the system and should be removed from the system configuration. 1) If the DA for the missing device supports the Missing Device Procedure 2 (suptests==SUPTESTS_MS2), then call the DA. The Diagnostic Controller does not automatically delete the device from the system configuration. 2) Otherwise, flag the device to be deleted. c. The resource has been moved to another location and should be removed from the system configuration. 1) Display a list of the new devices that are of the same type so that the user can identify where the missing device was moved. This list should contain a default selection for "Not Listed" in the event that the device was not detected in its new location, in which case a default service request number (SRN) should be generated. 2) Assuming the user identified a new location: a) If the missing device has children which are non-detectable:
  • Present a menu to the user asking if the children should be reconfigured to the new device. The menu should contain a single selection for all of the devices and additional selections for the individual devices.

  • When a device is chosen, the parent field needs to be changed and the device configured. The mkdev command is used to configure the device. b) Delete the missing device and any children that have not been reconfigured. d. The resource has been turned off and should be removed from the system configuration. 1) Flag the device to be removed from the configuration database. e. The resource has been turned off but should remain in the system configuration. 1) Do nothing.

  1. Once all the missing devices have been processed through one of the selections above, then perform the following: a. Report any problems found. b. Delete the devices that were previously flagged to be deleted. c. If a new resource has been added, then display a list of the new devices. Ask the user if the list is correct. 1) If Yes, then exit. 2) If No, display predefined SRN indicating some new devices were not detected. Exit.

오류 로그 분석

오류 로그 분석은 자원을 시험하지 않습니다. 대신 운영 체제 오류 로그에서 자원과 관련된 항목을 찾습니다. 항목을 찾으면 기록된 오류를 분석하고, 진단 응용 프로그램이 그 자원을 나쁜 것으로 호출(call out)할지 판단합니다.

진단 서브시스템에서 오류 로그 분석은 여러 방법으로 수행합니다. 첫째는 운영 체제 오류 로그에 영구(permanent) 하드웨어 오류가 기록될 때마다 자동으로 하는 방법이며, 자동 오류 로그 분석(DIAGELA)이라고 합니다.

둘째는 하루 중 정해 둔 시각에 진단이 자동으로 실행되도록 설정하는 방법이며, 주기 진단(Periodic Diagnostics)이라고 합니다.

셋째는 diag 명령에 -e 플래그를 주어 명령줄에서 바로 실행하는 방법입니다.

넷째는 진단을 처음 시작한 뒤 문제 판별 모드로 진단을 실행할 때마다 자동으로 불리는 방법이며, 아래에서 설명합니다.

영어 원문

Error log analysis

Error log analysis does not test the resource. Instead this method searches the operating system error log for an entry (or entries) related to the resource. If an entry is found, then an analysis is performed on the error that was logged, and a determination is made by the Diagnostic Application as to whether the resource should be called out as being bad.

Error log analysis is performed via different methods with the Diagnostic Subsystem. One method is that error log analysis is performed automatically whenever a permanent hardware error is logged to the operating system error log. This method is called Automatic Error Log Analysis (DIAGELA).

A second method can be set up to run diagnostics automatically at a pre-set time of the day. This method is referred to as Periodic Diagnostics.

A third method can be run directly from the command line by using the -e flag with the diag command.

A fourth method is invoked automatically whenever diagnostics is ran in Problem Determination Mode after first starting diagnostics. This method is described below.

진단에서 문제 판별 모드 실행

진단에 처음 들어갈 때 문제 판별(Problem Determination) 모드를 고르면, 진단 컨트롤러가 운영 체제 오류 로그에서 영구 하드웨어 오류를 찾습니다.

최근 24시간 안에 기록된 오류가 있으면 알맞은 진단 응용 프로그램을 불러 오류 로그를 분석합니다. 기록된 오류 때문에 문제가 의심되면 사용자에게 문제 보고(Problem Report) 화면을 보여 줍니다. 문제를 찾지 못하면 자원 선택(Resource Selection) 메뉴를 표시합니다.

영어 원문

Running problem determination mode in diagnostics

If Problem Determination mode is selected upon entering diagnostics the first time, the Diagnostic Controller searches the operating system error log for any Permanent Hardware errors.

If any errors were logged within the last 24 hours, the appropriate Diagnostic Application is called to analyze the error log. If an problem is suspected due to an error logged, a Problem Report screen will be presented to the user. If no problem is found, then the Resource Selection menu is displayed.

주기 진단

이 시험을 지원하는 시스템에서는 디스크 드라이브와 배터리의 주기 시험이 기본으로 켜져 있습니다. 디스크 진단은 모든 디스크에 대해 디스크 오류 로그 분석을 합니다. 배터리 시험은 실시간 시계(RTC)와 NV-RAM 배터리를 확인합니다.

주기 진단은 진단 버전에 따라 방법이 다릅니다. 시험 시각을 바꾸거나 목록에 다른 자원을 더하려면 주기 진단(Periodic Diagnostics) 작업을 씁니다.

시스템에서 동적으로 뺀 프로세서는 주기 시험 목록에서도 빠집니다. 동적으로 더한 프로세서는 주기 시험 목록에 자동으로 더해집니다.

주기 진단은 프로세서만 지원합니다. 주기 진단은 오류 로그를 자동으로 분석하고 오류를 보고합니다. 프로세서를 소유한 시스템에서는 프로세서 진단을 지원합니다. 그러나 어떤 하드웨어 플랫폼은 프로세서를 플랫폼이 소유하고 AIX 대신 시험을 하므로, 그런 프로세서에서는 주기 진단을 지원하지 않습니다. 플랫폼이 소유한 프로세서의 오류는 플랫폼이 기록하고 자동 오류 로그 분석이 분석합니다.

지원 여부는 실행할 때 하드웨어 구성의 특성으로 정합니다. 프로세서에 물리 위치 코드(플랫폼 펌웨어가 만들어 운영 체제에 넘김)가 없으면 주기 진단은 지원되지 않는다고 판단합니다.

프로세서에 물리 위치 코드가 있으면 파티션이 프로세서를 소유하므로 주기 진단을 지원합니다. 물리 위치 코드가 없으면 공유 프로세서나 가상 프로세서이므로 주기 진단을 지원하지 않습니다.

영어 원문

Periodic diagnostics

Periodic testing of the disk drives and battery are enabled by default on systems that support these tests. The disk diagnostics perform disk error log analysis on all disks. The battery test checks the real-time clock and NV-RAM battery.

Periodic diagnostics are performed in different ways, depending on the diagnostic version. Use the Periodic Diagnostics task to change the test times or to add other resources to the list.

Processors that are dynamically removed from the system will also be removed from the periodic test list. Processors that are dynamically added are automatically added to the periodic test list.

Periodic Diagnostics supports only processors. Periodic Diagnostics automatically analyzes the error log and reports the errors. Periodic Diagnostics supports processor diagnostics on systems that own the processor. However, some hardware platforms own the processors and provide testing instead of AIX®, so Periodic Diagnostics on those processors is not supported. Errors on the processors owned by the platform are logged by the platform and analyzed by automatic error log analysis.

Support is determined at run time from the characteristics of the hardware configuration. Periodic Diagnostics determines it is not supported when processors do not have physical location codes, which are created by platform firmware and passed to the operating system.

If processors have a physical location code, then the partition owns the processor and Periodic Diagnostics is supported. If there is no physical location code for a processor, it is a shared or virtual processor and Periodic Diagnostics is not supported.

기술 설명

진단 데몬 diagd는 bos.diag 진단 패키지를 설치하면 실행됩니다. diagd는 CDiagAtt ODM 데이터베이스의 사용자 정의 항목을 보고 어느 장치를 언제 실행할지 정합니다. 이 데이터베이스는 진단을 실행하거나 장치의 실행 시각을 바꾸려고 주기 진단 서비스 보조를 실행할 때 만들어집니다. 데이터베이스에 항목이 없으면(예: 진단을 한 번도 실행하지 않았을 때) ioplanar 배터리 시험과 디스크 드라이브에 기본 시각이 주어집니다. 다음은 CDiagAtt 항목의 예입니다(9999는 시험하지 않음, 0400은 오전 4시에 시험).

text
CDiagAtt->attribute = p_test_time
CDiagAtt->value = 9999 Do not test
        = 0400 Test at 4AM

diagd는 다음 예약 시각에 깨어나도록 타이머를 설정합니다. diagd가 깨어나면 /usr/lpp/diagnostics/bin/diagela 스크립트를 -t 플래그로 실행합니다.

diagela는 장치의 PDiagAtt->test_mode 비트를 확인해 이 모드에서 그 장치를 시험할지 정합니다. 비트가 설정되어 있지 않으면 시험하지 않고, 설정되어 있으면 -e(ELA) 플래그를 설정해 장치에 진단을 실행합니다.

어떤 시스템에서는 주기 진단 대신 플랫폼 펌웨어가 메모리와 프로세서를 시험합니다. 이 자원의 오류는 여전히 AIX가 보고하지만 실제 시험은 펌웨어가 합니다. diagd가 주기적으로 시험할 자원이 없다고 판단하면 종료합니다.

영어 원문

Technical Description

The Diagnostic daemon diagd executes once the bos.diag diagnostic package is installed. The diagd looks for customized entries in CDiagAtt odm database to determine which devices to run at which times. The

database is built when diagnostics are run or the Periodic Diagnostic Service Aid is run to change run times for devices. If the database has no entries (for example, when diagnostics have never been run), then default times are given to the ioplanar battery test and disk drives. The following is an example of CDiagAtt entries.

text
CDiagAtt->attribute = p_test_time
CDiagAtt->value = 9999 Do not test
        = 0400 Test at 4AM

The diagd sets a timer to wake up at the next scheduled time to run. Once diagd wakes up, the script /usr/lpp/diagnostics/bin/diagela is executed with the -t flag.

diagela checks the PDiagAtt->test_mode bit for the device to determine whether that device should be tested in this mode. If the bit is not set, diagela does not test the device. If the bit is set, diagnostics are run on the device with the -e (ELA) flag set.

Platform firmware, rather than Periodic Diagnostics, is used to test memory and processors on some systems. AIX® still reports errors on theses resources, but firmware does the actual testing. If the diagd determines that there are no resources to test periodically, it will terminate.

제한 사항

IBM System p5는 어떤 AIX 버전에서도 AIX 프로세서 진단과 주기 진단을 지원하지 않습니다.

영어 원문

Limitation

The IBM® System p5® does not support AIX® processor diagnostics and Periodic Diagnostics in any version of AIX®.

자동 오류 로그 분석(DIAGELA)

자동 오류 로그 분석(diagela)은 영구 하드웨어 오류가 기록될 때마다 오류 로그 분석을 하는 기능입니다. 영구 하드웨어 자원 오류가 기록되고 diagela 프로그램이 켜져 있으면 diagela 프로그램이 불립니다. 자동 오류 로그 분석은 모든 플랫폼에서 기본으로 켜져 있습니다.

diagela 프로그램은 진단이 그 오류를 분석해야 하는지 판단합니다. 분석해야 하면 진단 응용 프로그램을 불러 오류를 분석합니다. 시험은 하지 않습니다. 진단이 그 오류에 서비스 조치가 필요하다고 판단하면 콘솔과 모든 system 그룹 사용자에게 메시지를 보냅니다. 메시지에는 SRN이나 수정 조치가 들어 있습니다.

이 모드로 진단을 실행하는 것은 diag -c -e -d 장치 명령을 쓰는 것과 비슷합니다.

PDiagAtt 객체 클래스에 스탠자를 더해 알림을 사용자 정의할 수도 있습니다. 다음 예는 일반 메일 메시지 대신 고객의 프로그램을 부르는 방법을 보여 줍니다.

text
PDiagAtt:
DClass = ""
DSClass = ""
DType = ""
attribute = "diag_notify"
value = "/usr/bin/customer_notify_program $1 $2 $3 $4 $5 $6"
DApp = ""

DClass, DSClass, DType이 비어 있으면 customer_notify_program이 모든 장치에 적용됩니다. DClass, DSClass, DType을 구체적으로 채우면 그 장치 유형에만 customer_notify_program을 부릅니다.

위 스탠자를 ODM 데이터베이스에 더하면 문제가 시스템 콘솔에 표시되고, 사전 정의 속성 diag_notify의 value 필드에 지정한 프로그램이 불립니다. 알림 프로그램의 인수로 다음 키워드가 자동으로 펼쳐집니다.

인수 값
$1 키워드 diag_notify
$2 문제를 보고한 자원 이름
$3 서비스 요청 번호(SRN)
$4 장치 유형
$5 오류 로그 항목의 오류 레이블
$6 문제를 보고한 진단 세션의 프로세스 ID

오류 로그 항목을 분석할 진단 프로그램이 없거나, 분석했지만 오류가 보고되지 않은 경우에 부를 별도 프로그램을 지정할 수도 있습니다. attribute = diag_analyze인 스탠자를 PDiagAtt 객체 클래스에 더하면 됩니다. 다음 예는 이 경우에 고객의 프로그램을 부르는 방법을 보여 줍니다.

text
PDiagAtt:
        DClass = ""
        DSClass = ""
        DType = ""
        attribute = "diag_analyze"
        value = "/usr/bin/customer_analyzer_program $1 $2 $3 $4 $5"
        rep = "s"
        DApp = ""

DClass, DSClass, DType이 비어 있으면 customer_analyzer_program이 모든 장치에 적용됩니다. DClass, DSClass, DType을 구체적으로 채우면 그 장치 유형에만 customer_analyzer_program을 부릅니다.

위 스탠자를 ODM 데이터베이스에 더하면, 그 오류에 지정된 진단 프로그램이 없거나 분석했지만 오류를 찾지 못했을 때 지정한 프로그램이 불립니다. 분석 프로그램의 인수로 다음 키워드가 자동으로 펼쳐집니다.

인수 값
$1 키워드 diag_analyze
$2 문제를 보고한 자원 이름
$3 ELA로 불렸으면 오류 로그 항목의 오류 레이블, 주기 진단으로 불렸으면 키워드 PERIODIC, 진단 알림(Diagnostic Reminder)으로 불렸으면 키워드 REMINDER
$4 장치 유형
$5 분석 프로그램을 실행했지만 문제가 없으면 키워드 no_trouble_found, 분석 프로그램이 없으면 no_analyzer

자동 오류 로그 분석 기능을 켜려면 root로 로그인해 다음 명령을 입력합니다.

text
/usr/lpp/diagnostics/bin/diagela ENABLE

자동 오류 로그 분석 기능을 끄려면 root로 로그인해 다음 명령을 입력합니다.

text
/usr/lpp/diagnostics/bin/diagela DISABLE

diagela는 주기 진단 서비스 보조로도 켜고 끌 수 있습니다.

영어 원문

Automatic error log analysis (DIAGELA)

Automatic Error Log Analysis (diagela) provides the capability to do error log analysis whenever a permanent hardware error is logged. Whenever a permanent hardware resource error is logged and the diagela program is enabled, the diagela program is invoked. Automatic Error Log Analysis is enabled by default on all platforms.

The diagela program determines whether the error should be analyzed by the diagnostics. If the error should be analyzed, a diagnostic application will be invoked and the error will be analyzed. No testing is done. If the diagnostics determines that the error requires a service action, it sends a message to your console and to all system groups. The message contains the SRN, or a corrective action.

Running diagnostics in this mode is similar to using the diag -c -e -d device command.

Notification can also be customized by adding a stanza to the PDiagAtt object class. The following example illustrates how a customer's program can be invoked in place of the normal mail message:

text
PDiagAtt:
DClass = ""
DSClass = ""
DType = ""
attribute = "diag_notify"
value = "/usr/bin/customer_notify_program $1 $2 $3 $4 $5 $6"
DApp = ""

If DClass, DSClass, and DType are blank, then the customer_notify_program will apply for ALL devices. Filling in the DClass, DSClass, and DType with specifics will cause the customer_notify_program to be invoked only for that device type.

Once the above stanza is added to the ODM data base, problems will be displayed on the system console and the program specified in the value field of the diag_notify pre-defined attribute will be invoked. The following keywords will be expanded automatically as arguments to the notify program:

  • $1 — the keyword diag_notify
  • $2 — the resource name that reported the problem
  • $3 — the Service Request Number
  • $4 — the device type
  • $5 — the error label from the error log entry
  • $6 — the process id of the diagnostic session reporting the problem

In the case where no diagnostic program is found to analyze the error log entry, or analysis is done but no error was reported, a separate program can be specified to be invoked. This is accomplished by adding a stanza to the PDiagAtt object class with an attribute = diag_analyze. The following example illustrates how a customer's program can be invoked for this condition:

text
PDiagAtt:
        DClass = ""
        DSClass = ""
        DType = ""
        attribute = "diag_analyze"
        value = "/usr/bin/customer_analyzer_program $1 $2 $3 $4 $5"
        rep = "s"
        DApp = ""

If DClass, DSClass, and DType are blank, then the customer_analyzer_program will apply for ALL devices. Filling in the DClass, DSClass, and DType with specifics will cause the customer_analyzer_program to be invoked only for that device type.

Once the above stanza is added to the ODM data base, the program specified will be invoked if there is no diagnostic program specified for the error, or if analysis was done, but no error found. The following keywords will be expanded automatically as arguments to the analyzer program:

  • $1 — the keyword diag_analyze
  • $2 — the resource name that reported the problem
  • $3 — the error label from the error log entry if invoked for ELA, or the keyword PERIODIC if invoked for Periodic Diagnostics, or the keyword REMINDER if invoked for providing a Diagnostic Reminder
  • $4 — the device type
  • $5 — the keyword: no_trouble_found, if analyzer was run, but no trouble was found; or no_analyzer, if analyzer not available.

To activate the Automatic Error Log Analysis feature, log in as root and type the following command:

text
/usr/lpp/diagnostics/bin/diagela ENABLE

To disable the Automatic Error Log Analysis feature, log in as root and type the following command:

text
/usr/lpp/diagnostics/bin/diagela DISABLE

Diagela can also be enabled and disabled using the Periodic Diagnostic Service Aid.

루프 시험

루프 시험은 프로그램 제어 아래 자원을 여러 번 시험하는 것입니다. 루프는 진단 컨트롤러가 제어합니다. 루프 시험은 유지 보수 모드나 서비스 모드에서 실행하고 고급 진단 루틴(Advanced Diagnostic Routines)을 골랐을 때만 지원합니다.

사용자는 시험 방법(Test Method) 메뉴에서 루프 시험을 원한다고 지정합니다. 루프 시험의 규칙은 첫 번째와 마지막 실행에서만 사용자 대화를 허용한다는 것입니다.

진단 응용 프로그램은 TMInput 객체 클래스의 loopmode 값을 얻어 루프 모드가 불렸음을 알게 됩니다. loopmode 값에 따라 DA가 할 일은 다음과 같습니다.

loopmode DA가 할 일
LOOPMODE_ENTERLM 평소처럼 시험을 하고, 문제 판별 모드로 실행 중이면 오류 로그 분석도 합니다.
LOOPMODE_INLM 평소처럼 시험을 하고, 오류 로그 분석은 하지 않습니다.
LOOPMODE_EXITLM 시험도 오류 로그 분석도 하지 않습니다. 대신 끝내기 전에 랩 플러그를 빼는 등의 정리 절차를 부릅니다.
영어 원문

Loop testing

Loop testing is the testing of a resource or resources multiple times under program control. The looping is controlled by the Diagnostic Controller. Loop testing is only supported when running in maintenance mode or service mode, and Advanced Diagnostic Routines have been chosen.

The user indicates that loop testing is desired at the Test Method menu. The rule associated with loop testing is that user interaction is only allowed on the first and last pass.

The diagnostic applications get notification that loop mode has been invoked by obtaining the value of loopmode in the TMInput object class. The following actions should be taken by the DA when loopmode has the following values:

LOOPMODE_ENTERLM

The Diagnostic Application should perform any tests as usual, plus perform Error Log Analysis if running in Problem Determination mode.

LOOPMODE_INLM

The Diagnostic Application should perform any tests as usual, and not Error Log Analysis.

LOOPMODE_EXITLM

The Diagnostic Application should not perform any tests, nor perform Error Log Analysis. Instead cleanup procedures should be invoked to remove wrap plugs, etc, before exiting.

진단 패키징

이 절은 진단 서브시스템 환경을 이루는 여러 구성 요소를 설명합니다.

영어 원문

Diagnostic Packaging

This section contains information about the various components that make up the Diagnostic Subsystem environment.

하드 파일 패키징

이 절은 여러 진단 파일을 어떻게 패키지로 묶는지 설명합니다. 이 패키지들은 설치 과정에서 진단을 하드 파일에 적재하는 데 쓰입니다.

영어 원문

Hardfile packaging

This section contains information about how the various diagnostic files are packaged. These packages are used by the install process to load diagnostics on the hardfile.

소프트웨어 패키지와 파일 세트

진단은 별도 소프트웨어 패키지와 파일 세트로 묶여 있습니다.

기본 진단 지원은 bos.diag 패키지에 들어 있습니다. 장치별 지원은 별도 devices.[type].[deviceid] 패키지로 묶여 있습니다.

bos.diag 패키지는 세 파일 세트로 나뉩니다.

파일 세트 내용
bos.diag.rte 컨트롤러와 다른 기본 진단 코드
bos.diag.util 서비스 보조와 작업
bos.diag.com 진단 라이브러리, 커널 확장, 개발용 헤더 파일

devices.[type].[deviceid] 패키지는 여러 파일 세트로 나뉩니다. type은 보통 버스 유형이나 장치 클래스를, deviceid는 보통 장치의 고유 식별자를 뜻합니다. 예를 들면 다음과 같습니다.

파일 세트 내용
devices.mca.8d77.rte Micro Channel 8비트 SCSI I/O 컨트롤러의 장치 드라이버와 구성 메서드
devices.mca.8d77.diag 장치의 진단 응용 프로그램과 기본 카탈로그 파일

이 패키지·파일 세트는 보통 installp 명령으로 하드 파일에 설치합니다.

영어 원문

Software packages and filesets

Diagnostics is packaged into separate software packages and filesets.

The base diagnostics support is contained in package bos.diag. The individual device support is packaged in separate devices.[type].[deviceid] packages.

The bos.diag package is split into three distinct filesets:

  • bos.diag.rte — Contains the Controller and other base diagnostic code.
  • bos.diag.util — Contains the Service Aids and Tasks.
  • bos.diag.com — Contains the diagnostic libraries, kernel extensions, and development header files.

The devices.[type].[deviceid] packages are split into various distinct filesets. type usually signifies a bus type, or device class of devices. deviceid usually signifies a unique identifier for the device. For example:

  • devices.mca.8d77.rte — Contains the device driver and configuration methods for the Micro Channel 8-bit SCSI I/O Controller.
  • devices.mca.8d77.diag — Contains the Diagnostic Application and default catalog file for the device.

These packages/filesets are normally installed to a hardfile with the installp command.

디렉터리 구조

진단 서브시스템이 쓰는 디렉터리 구조입니다. 진단용으로 새로 만드는 파일도 같은 규칙을 따라야 합니다.

디렉터리 내용
/etc/lpp/diagnostics/data 진단 프로그램이 만드는(읽기·쓰기) 파일. 예: 진단 컨트롤러가 만드는 진단 보고서 파일
/usr/lpp/diagnostics/bin 진단 컨트롤러와 서비스 보조·작업
/usr/lpp/diagnostics/da 진단 응용 프로그램
/usr/lpp/diagnostics/catalog 모든 진단 프로그램이 쓰는 기본(영어) 카탈로그 파일
/usr/lpp/diagnostics/slih 테스트 단위가 쓰는 2차 인터럽트 처리기(SLIH)
/usr/lpp/diagnostics/lib 적재 가능한 테스트 단위 라이브러리

참고: 번역된 진단 카탈로그 파일은 /usr/lib/nls/msg/[LANG] 디렉터리에 있습니다.

영어 원문

Directory structure organization

Use the topic to view the directory structures used by the Diagnostic Subsystem. New files created for diagnostic purposes should follow the same convention.

  • /etc/lpp/diagnostics/data - Contains files that are created (Read/Write) by the diagnostics programs. Examples are the diagnostic report files created by the Diagnostic Controller.

  • /usr/lpp/diagnostics/bin - Contains the Diagnostic Controller, and Service Aids/Tasks.

  • /usr/lpp/diagnostics/da - Contains the Diagnostic Applications.

  • /usr/lpp/diagnostics/catalog - Contains the default (English) catalog files used by all Diagnostic programs.

  • /usr/lpp/diagnostics/slih - Contains the Second Level Interrupt Handlers used by the Test Units.

  • /usr/lpp/diagnostics/lib - Contains the loadable Test Unit Libraries.

Note: The translated diagnostic catalog files are in /usr/lib/nls/msg/[LANG] directories.

CD-ROM 패키징(POWER 프로세서 기반만)

진단 CD-ROM에는 Rock Ridge 기반 CD-ROM 파일 시스템을 썼습니다. Rock Ridge CD-ROM 파일 시스템은 8단계보다 깊은 디렉터리, 대소문자가 섞인 파일 이름, 운영 체제 파일 시스템과 비슷한 파일 구조를 지원합니다.

독립형 진단 CD-ROM에는 진단을 실행하는 데 필요한 모든 프로그램과 응용 프로그램이 들어 있습니다. 최신 버전의 운영 체제, 장치 드라이버, 장치 구성 메서드, 진단 응용 프로그램, ODM 스탠자가 포함됩니다.

진단 CD-ROM에 없는 장치 지원은 진단 보조 매체(Diagnostic Supplemental Media)로 지원해야 합니다.

영어 원문

CDROM packaging (POWER® processor-based only)

The Rock Ridge-based CDROM File System was used for the Diagnostic CDROM. The Rock Ridge CDROM File System supports directory levels deeper than 8, mixed-case file names and a file structure similar to operating system file systems.

The Standalone Diagnostic CDROM contains all programs and applications necessary to run Diagnostics. This includes the latest version of the operating system, device drivers, device configuration methods, diagnostic applications, and ODM stanzas.

Device support that is not on the Diagnostic CDROM must be supported by Diagnostic Supplemental Media.

진단 보조 매체

진단 보조 매체에는 독립형 진단 CD-ROM과 함께 쓸 때 특정 자원을 시험하는 데 필요한 모든 진단 프로그램과 파일이 들어 있습니다. 보조 매체는 보통 디스켓 레이블에 적힌 대로 자원과 함께 출시되어 배송됩니다.

보조 매체 처리(Process Supplemental Media) 작업이 진단 보조 매체를 처리합니다.

다음 주제들은 진단 보조 매체와 그 내용을 더 자세히 설명합니다.

영어 원문

Diagnostic supplemental media

A Diagnostic Supplemental Media contains all the necessary diagnostic programs and files required to test a particular resource when used with the Standalone Diagnostic CDROM. The supplemental is normally released and shipped with the resource as indicated on the diskette label.

The Process Supplemental Media task processes the diagnostic supplemental media.

The following topics describe the Diagnostic Supplemental Media and the contents in more detail.

진단 보조 디스켓 내용

진단 보조 디스켓에는 장치를 구성하고 시험하는 데 필요한 모든 파일이 있어야 합니다. 독립형 진단 패키지가 디스켓의 소프트웨어를 관리하는 데는 특수 파일 세 개(diagstartS, diagS.dep, diagcleanupS)가 필요합니다. 디스켓은 cpio 형식으로 써야 하며, 디스켓을 만들 때 cpio 명령의 C36 블록 옵션을 씁니다. 필요한 파일은 다음과 같습니다.

파일 설명
etc/diagstartS 객체 클래스 스탠자를 데이터베이스에 더하고 장치를 구성하는 등의 셸 스크립트(실행 권한 필요). 예제 diagstartS 셸 스크립트를 봅니다. 이 파일은 디스켓의 첫 파일이어야 합니다.
etc/diagS.dep 의존성 파일. 디스켓의 모든 파일 목록이며, 파일마다 전체 경로 이름으로 적어야 합니다.
etc/diagcleanupS 정리 스크립트 파일. 보조 매체를 처리하고 실행한 뒤 필요한 정리를 합니다. 예를 들어 보조 매체가 원래 값 일부를 바꿨다면 ODM 데이터베이스를 원래 상태로 되돌립니다.
etc/stanzas/device.add 장치의 스탠자 파일. 장치에 필요한 PdDv, PdCn, PdAt, PDiagRes 정보가 있어야 합니다.
usr/lib/drivers/devicedd 장치의 장치 드라이버. devicedd는 장치 드라이버 이름이어야 합니다.
usr/lib/methods/devicecfgmethod, usr/lib/methods/deviceunconfigmethod 장치를 정의, 구성, 정의 해제, 구성 해제하는 데 필요한 메서드. 이름은 PdDv 메서드 객체가 가리키는 것과 같아야 합니다. 운영 체제에 이미 있는 메서드는 넣지 말고, 이 장치만 쓰는 고유 메서드만 넣습니다.
usr/lib/methods/devicedesc.cat 장치 설명 카탈로그 파일. devicedesc.cat은 PdDv catalog 객체가 가리키는 카탈로그 파일 이름이어야 합니다. lsdev나 lscfg 명령에서 보이는 장치 설명이 들어 있어야 합니다.
usr/lpp/diagnostics/da/ddevice 장치의 진단 응용 프로그램(DA). ddevice는 DA 이름이며 PDiagRes DaName 객체가 가리키는 이름과 같아야 합니다.
usr/lpp/diagnostics/catalog/default/ddevice.cat 장치의 DA 메시지 카탈로그. DA 메뉴와 FRU 정보가 들어 있습니다. 쓰는 세트 번호는 PDiagRes PSet 객체가 가리키는 번호와 같아야 합니다.
usr/lpp/diagnostics/slih/device_slih 장치의 2차 인터럽트 처리기
usr/lpp/diagnostics/lib/lib_device 장치의 적재 가능한 테스트 단위 라이브러리

참고: 만드는 보조 디스켓이 콘솔 장치로 쓸 수 있는 그래픽 어댑터용이면 접미사 S 대신 3S를 씁니다. 예를 들어 etc/diagstartS는 etc/diagstart3S, etc/diagS.dep는 etc/diag3S.dep, etc/diagcleanupS는 etc/diagcleanup3S가 됩니다.

영어 원문

Diagnostic Supplemental Diskette Contents

A Diagnostic Supplemental Diskette must contain all files required to configure and test a device. Three special files, diagstartS, diagS.dep, and diagcleanupS, are required by the Standalone Diagnostic Package to maintain the software on the diskette. The diskette must be written in cpio format. Use the C36 block option on the cpio command to create the diskette. The following list describes each required file:

  • etc/diagstartS — Shell script (with execute permission) to add the object class stanzas to the database, configure the devices, and so on. See the example diagstartS shell script file. This file must be the first file on diskette.
  • etc/diagS.dep — Dependency file. This file is a list of all files on the diskette. Each file must be listed with its full path name.
  • etc/diagcleanupS — Cleanup script file. This script should perform any cleanup necessary after the supplemental has been processed and run; for example, restoring the ODM database to its original condition if the supplemental changed some of the original values.
  • etc/stanzas/device .add — Stanza file for the device. The stanzas must include the PdDv, PdCn, PdAt, and PDiagRes information required for the device.
  • usr/lib/drivers/devicedd — Device driver for the device. The devicedd variable should be the name of the device driver.
  • usr/lib/methods/devicecfgmethod and usr/lib/methods/deviceunconfigmethod — Methods necessary to define, configure, undefine, and unconfigure the device. The names must be the same referenced by the PdDv method objects. Do not include any methods that are already part of the operating system. Include only the unique methods used by this device.
  • usr/lib/methods/devicedesc.cat — Device description catalog file devicedesc.cat should be the name of the catalog file referenced by the PdDv catalog object. The device description file should contain the description of the device shown when using the lsdev or lscfg command.
  • usr/lpp/diagnostics/da/ddevice — Diagnostic Application (DA) for the device. The ddevice variable should be the name of the DA, which is the same name referenced by the PDiagRes DaName object.
  • usr/lpp/diagnostics/catalog/default/ddevice.cat — DA message catalog for the device. The DA menus are included in this file. This message catalog file also contains FRU information. The set number used must be the same number referenced by the PDiagRes PSet object. Note: If the supplemental diskette being developed is for a graphics adapter that can be used as a console device, then the suffix 3S should be used instead of S. For example, the file etc/diagstartS should be etc/diagstart3S, etc/diagS.dep should be etc/diag3S.dep, and etc/diagcleanupS should be etc/diagcleanup3S.
  • usr/lpp/diagnostics/slih/device_slih — Second Level Interrupt Handler for the device.
  • usr/lpp/diagnostics/lib/lib_device — Device Test Unit loadable library.

ODM 스탠자 예

text
PdDv:
              type = xyz
              subclass = mca
              class = adapter
              catalog = xyz.cat
              setno = 1
              msgno = 1
              Define = /usr/lib/methods/definexyz
              Configure = /usr/lib/methods/cfgxyz
              Undefine = /usr/lib/methods/udefinexyz
              Unconfigure = /usr/lib/methods/ucfgxyz
              led = 0x902
              fru = 1                         1 if device is FRU
                                              2 if parent is FRU
PDiagRes:
              Uniquetype = adapter/mca/xyz
              PSet = 1
              DaName = dxyz
              PkgBlock = S
              Menu = 21
              DNext = 1
              SupTests = 7

PDiagRes의 모든 필드 설명은 사전 정의 진단 자원 객체 클래스(진단 객체 클래스 글)를 봅니다.

text
/usr/lib/methods/xyz.cat:
        1 1     XYZ adapter
/usr/lpp/diagnostics/catalog/default/dxyz.cat:
        1 1     Description of FRU1
        1 2      Description of FRU2
        2 1      DA menus, etc
영어 원문

Example ODM Stanzas

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

For a description of all fields in PDiagRes, refer to Predefined Diagnostic Resource Object Class.

text
/usr/lib/methods/xyz.cat:
        1 1     XYZ adapter
/usr/lpp/diagnostics/catalog/default/dxyz.cat:
        1 1     Description of FRU1
        1 2      Description of FRU2
        2 1      DA menus, etc

diagstartS 스크립트 파일 예

text
# DIAG S
# Do not erase top line. Chkdskt searches for the string DIAG S
#
# COMPONENT_NAME: DIAGBOOT - DIAGNOSTIC SUPPLEMENTAL DISKETTE
#
# FUNCTIONS: Diagnostic Diskette Supplemental Script File
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1991
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM
# Corp.
#
configure=0
# See if there is a need to add stanzas to data base.
# This is done by searching the /etc/addfile for your stanza file
# name. If not found, add stanzas and call /etc/cfgmgr to
# configure the resources that are needed to be tested.
cd /etc/stanzas
set `echo *`
ADD=`echo $1`
# Warning: If your stanza is already in PDiagDev, DO NOT ADD another.
for i in `/bin/cat /etc/addfile`
do
        if [ $i = $ADD ]
        then
                configure=1
                break
        fi
done
# Check the PDiagDev for a DType/DSClass equal to your stanza
# before adding  in the new one. If not found, add stanzas and
# call /etc/cfgmgr to configure the resources that are needed to
# be tested.
if [ $configure = 0 ]
then
        # Check the PDiagDev for a DType/DSClass equal to your
        # stanza before adding  in the new one.
        # If not found, add stanzas and call /etc/cfgmgr to
        # configure the resources that are needed to be tested.
        X=`odmget -q"DType=DeviceType and DSClass=SubClass" PDiagDev`
if [ "X$X" != X ]
then
        # save the data and read it in later with the diagcleanup script.
        odmget -q"DType=DeviceType and DSClass=SubClass" PDiagDev > /tmp/mysave
        odmdelete -q"DType=DeviceType and DSClass=SubClass" -o PDiagDev
fi
        for i in *.add
        do
                odmadd $i                        >>$F1 2>&1
                echo $i >> /etc/addfile
                rm $i                            >>$F1 2>&1
        done
        /etc/cfgmgr     -t -d                    >>$F1 2>&1
else
        for i in *.add
        do
                rm $i                            >>$F1 2>&1
        done
fi
exit 0
영어 원문

Example diagstartS Script File

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

diagstart3S 스크립트 파일 예

text
# DIAG 3S
# Do not erase top line. Chkdskt searches for the string DIAG 3S
#
# COMPONENT_NAME: DIAGBOOT - DIAGNOSTIC GRAPHIC SUPPLEMENTAL
# DISKETTE
#
# FUNCTIONS: Diagnostic Diskette Supplemental Script File
#
# ORIGINS: 27
configure=0
# See if there is a need to add stanzas to database.
# This is done by searching the /etc/addfile for your stanza file
# name. If not found, add stanzas and call /etc/cfgmgr to
# configure the resources that are needed to be tested.
cd /etc/stanzas
set `echo *`
ADD=`echo $1`
# Warning: If your stanza is already in PDiagDev, DO NOT ADD
another one in again.
for i in `/bin/cat /etc/addfile`
do
        if [ $i = $ADD ]
        then
                configure=1
                break
        fi
done
# Check the PDiagDev for a DType/DSClass equal to your stanza
# before adding  in the new one. If not found, add stanzas and
# call /etc/cfgmgr to configure the resources that are needed to
# be tested.
if [ $configure = 0 ]
then
        # Check the PDiagDev for a DType/DSClass equal to your stanza
        # before adding  in the new one. If not found, add stanzas and
        # call /etc/cfgmgr to configure the resources that are needed to
        # be tested.
        X=`odmget -q"DType=DeviceType and DSClass=SubClass" PDiagDev`
if [ "X$X" != X ]
then
        # save the data and read it in later with the diagcleanup script.
        odmget -q"DType=DeviceType and DSClass=SubClass" PDiagDev > /tmp/mysave
        odmdelete -q"DType=DeviceType and DSClass=SubClass" -o PDiagDev
fi
        for i in *.add
        do
                odmadd $i                         >>$F1 2>&1
                echo $i >> /etc/addfile
                rm $i                             >>$F1 2>&1
        done
        /etc/cfgmgr      -t -d                    >>$F1 2>&1
else
        for i in *.add
        do
                rm $i                             >>$F1 2>&1
        done
fi
echo > /tmp/3S           # flag that indicates diskette read.
exit 0
영어 원문

Example diagstart3S Script File

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

진단 보조 디스켓 레이블

진단 보조 디스켓마다 레이블이 있어야 합니다. 레이블에는 디스켓이 지원하는 가장 낮은 운영 체제 버전을 적어야 합니다.

영어 원문

Diagnostic Supplemental Diskette Label

Each Diagnostic Supplemental Diskette must have a label. The label should state the lowest version of the operating system that the diskette supports.