[AIX 진단 서브시스템 3] 진단 컨트롤러와 진단 응용 프로그램, SRN

핵심 정리

  • 진단 컨트롤러는 diag 명령으로 시작하며, ODM(CuDv와 PDiagRes)을 읽어 시험할 수 있는 자원 목록을 만들고, 고른 자원의 진단 응용 프로그램(DA)을 실행해 결과로 문제 보고서(FRU, 고장 확률, 이유)를 만듭니다. 결과는 /etc/lpp/diagnostics/data에 남고 diagrpt로 봅니다.
  • 문제 판별(PD) 모드에서는 최근 7일의 PERMANENT HARDWARE 오류를 자동으로 살펴봅니다. 반환값: 0 문제 없음, 1 하드웨어 고장, 2 인터럽트, 3 장치 없음, 4 다른 진단 실행 중 … 13 64비트 커널 미지원.
  • PDiagAtt의 notify_service(HMC 관리 시스템)·notify_extern(HMC 없음) 속성으로 진단 결론을 외부 프로그램에 알릴 수 있습니다.
  • DA는 32비트만 지원하며, 장치 구성·시험 수준 결정·오류 로그 분석(resource_alias)·FRU 버킷 보고(addfrub)·메뉴 결론(menugoal)·상태 저장(putdavar) 후 DA_EXIT()로 끝냅니다. 독립 실행형에서 돌려면 libc.a.min의 함수만 써야 합니다.
  • SRN은 소스번호-이유코드(예: 922-101). 컨트롤러가 내는 SRN: 802-xxx(장치 못 찾음), 803-xxx(시험 외 오류), 804-xxx(DA 중단), 801-101/102(독립 실행형에서 장치 못 찾음).
항목 내용
버전 AIX 5.3, AIX 6.1 (내용이 같고 6.1판에 EEH 알려진 문제 표가 더해짐)
원문 Understanding the Diagnostic Subsystem for AIX — 5.3판 3장(1125쪽), 6.1판 920쪽
파일 /etc/lpp/diagnostics/data, /usr/include/sys/errids.h, /usr/ccs/lib/libc.a.min
ODM CuDv, PDiagRes, PDiagAtt, TMInput, DAVars, FRUB, MenuGoal
관련 명령어 diag, diagrpt, errpt, lscfg

진단 서브시스템 환경을 이루는 여러 구성 요소의 정보입니다.

관련 개념

SLIH 변환에 필요한 변경: 64비트 커널로 이식하는 모든 SLIH에 적용해야 할 변경입니다("테스트 단위 64비트 이식" 글 참고).

영어 원문

Diagnostic components

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

Related concepts

SLIH conversion required changes The following required changes must be applied to all SLIHs being ported to 64-bit kernel.

진단 컨트롤러

진단 컨트롤러 기능은 root 사용자가 diag 명령을 입력하면 시작됩니다. 작업을 바로 할 수 있게 하는 여러 플래그를 입력으로 줄 수 있습니다. 예를 들어 시스템이나 특정 자원을 시험하라거나, 시스템을 사람 없이 실행하라고 지정할 수 있습니다. 플래그를 주지 않으면 진단 컨트롤러가 메뉴를 보여 사용자가 하려는 일을 알아냅니다.

진단 객체 클래스(diagnostic object class)는 진단 컨트롤러가 다룰 수 있는 자원과 작업을 정의합니다. 이 객체 클래스의 미리 정의된(predefined) 데이터가 시스템에 있을 수 있는 자원과 작업의 여러 속성을 지정합니다.

사용자 정의 장치 객체 클래스(Customized Device object class, CuDv)에는 시스템에 실제로 정의된 자원 인스턴스의 정보가 들어 있습니다. 정의된 자원 인스턴스는 그것을 제어하는 장치 드라이버가 있을 수도 없을 수도 있습니다. 자원은 랙, 드로어, 어댑터, 디스크, 메모리 카드, 부동 소수점 칩, 플래너, 버스 등입니다.

진단 컨트롤러는 데이터로 움직이는(data-driven) 프로그램입니다. CuDv와 미리 정의된 진단 자원 객체 클래스(PDiagRes)의 정보로 지원하는 자원 목록을 만들고, 이 목록으로 자원 선택(Resource Selection) 메뉴를 만듭니다.

진단 컨트롤러는 실행 중에 재구성 작업이 일어나면 자원 선택 메뉴를 갱신해 프로세서의 동적 재구성을 지원합니다.

사용자가 자원 선택 메뉴에서 고르면, 진단 컨트롤러는 PDiagRes 객체 클래스로 시작할 알맞은 진단 응용 프로그램(DA)을 정합니다. 진단 컨트롤러는 DA가 끝날 때까지 기다리며, DA의 상태는 exit 시스템 호출로 돌려받습니다.

진단 컨트롤러는 구성을 시스템 전체 관점에서 보므로 구성 데이터베이스를 따라가며 자원을 시험할 수 있습니다. 예를 들어 어떤 자원이 시험에 실패하면 문제를 격리할 때까지 다른 자원을 시험할 수 있습니다. 진단 컨트롤러는 자원 사이의 의존 관계를 압니다. "자원"이라는 말은 일반적인 뜻으로 쓰며 어댑터와 단말 장치를 모두 포함합니다.

진단 컨트롤러는 DA가 내린 결론을 분석해 문제 보고서(Problem Report)를 만듭니다. 문제 보고서에는 바꿔야 할 현장 교체 단위(FRU), FRU마다의 고장 확률, 그렇게 진단한 이유가 나옵니다.

진단 컨트롤러는 분석 결과를 /etc/lpp/diagnostics/data 디렉터리에 쓰며, 나중에 diagrpt 명령이나 Display Previous Diagnostic Results 작업으로 결과를 볼 수 있습니다.

또 진단 컨트롤러에 등록한 외부 프로그램에 문제를 알릴 수 있습니다. 등록은 PDiagAtt 클래스의 ODM 객체로 하며, 두 가지가 있습니다.

HMC(Hardware Management Console)에 연결된 시스템

text
PDiagAtt:
        DType = < fileset nickname >
        DSClass = ""
        attribute = "notify_service"
        value = ""
        rep = "s"
        DClass = ""
        DApp = < complete path to external notification program >

시스템이 HMC로 관리되면 notify_service 속성의 DApp에 지정한 프로그램이 불립니다. 프로그램은 진단 결론의 진단 이벤트 로그 순서 번호를 인수로 받습니다. 진단 이벤트 로그 API로 진단 분석의 구체적인 데이터를 꺼내 원하는 통지를 할 수 있습니다.

<fileset nickname>은 이 스탠자를 제공하는 파일 세트를 나타내는 15자 이하의 문자열입니다. 진단은 별명을 쓰지 않지만, 같은 속성 이름을 다른 파일 세트에서도 제공할 수 있으므로 속성을 설치·갱신하기 쉽도록 DType에 파일 세트마다 유일한 값이 있어야 합니다. 예를 들어 devices.chrp.base.diag 파일 세트는 다음과 같은 스탠자를 제공합니다.

text
PDiagAtt:
        DType = "DevChrBasDia"
        DSClass = ""
        attribute = "notify_service"
        value = ""
        rep = "s"
        DClass = ""
        DApp = /usr/lpp/diagnostics/bin/diagServiceEvent

HMC에 연결되지 않은 시스템

text
PDiagAtt:
        DType = < fileset nickname >
        DSClass = ""
        attribute = "notify_extern"
        value = ""
        rep = "s"
        DClass = ""
        DApp = < complete path to external notification program >

시스템이 HMC로 관리되지 않으면 notify_extern 속성의 DApp에 지정한 프로그램이 불립니다. 프로그램은 진단 결론의 진단 이벤트 로그 순서 번호를 인수로 받으며, 진단 이벤트 로그 API로 데이터를 꺼내 원하는 통지를 할 수 있습니다.

<fileset nickname>은 위와 같습니다. 예를 들어 devices.chrp.base.diag 파일 세트는 다음과 같은 스탠자를 제공합니다.

text
PDiagAtt:
        DType = "DevChrBasDia"
        DSClass = ""
        attribute = "notify_extern"
        value = ""
        rep = "s"
        DClass = ""
        DApp = /usr/lpp/diagnostics/bin/diagServiceEvent
영어 원문

Diagnostic controller

The Diagnostic Controller function is started when the root user enters the diag command. Various flags that allow operations to be performed directly may be specified as input. For example, a flag may specify that the system or a particular resource is to be tested or that the system is to be run unattended. If no flags are specified, then the Diagnostic Controller presents menus to determine what the user wants to do.

Diagnostic object classes define the resources and tasks available for the Diagnostic Controller to work with. Predefined data in these object classes specify various attributes about the resources and tasks that may be available on the system.

The Customized Device object class (CuDv)contains information describing the resource instances actually defined to the system. A defined resource instance may or may not have a corresponding device driver that is used to control it. A resource may be a rack, drawer, adapter, disk, memory card, floating point chip, planar, bus, and so on.

The Diagnostic Controller is a data-driven program. It uses information found in both the CuDv and the Predefined Diagnostic Resources object class (PDiagRes) to generate a list of supported resources. This list of supported resources is used to build the Resource Selection menu.

The Diagnostic Controller supports dynamic reconfiguration of processors by updating the Resource Selection menu if a reconfiguration operation occurs while the diagnostic controller is running.

Given the user's selection from the Resource Selection Menu, the Diagnostic Controller employs the PDiagRes object class to determine the appropriate Diagnostic Application (DA) to start. The Diagnostic Controller waits for the DA to complete. Diagnostic Application status is returned by the exit system call.

The Diagnostic Controller employs a system-wide view of the configuration enabling the Diagnostic Controller to walk through the configuration database testing resources. For example, if a resource fails its tests, the Diagnostic Controller may attempt to test other resources until the problem has been isolated. The Diagnostic Controller understands the dependencies between the resources. The term "resource" is used in a generic sense and includes adapters, as well as terminal devices.

The Diagnostic Controller analyzes the conclusions made by the Diagnostic Applications and generates a Problem Report. The Problem Report lists the field replaceable units (FRUs) that should be replaced, the probability of failure associated with each FRU, and the reason why the diagnosis was made.

The Diagnostic Controller writes its analysis to the directory /etc/lpp/diagnostics/data, and the diagrpt command, or Display Previous Diagnostic Results task, can be used at a later date to retrieve these results.

In addition, notification of problems can be sent to external programs registered with the Diagnostic Controller. The registration is by ODM objects in the PDiagAtt class. There are 2 possible registrations:

For Systems attached to a Hardware Management Console

text
PDiagAtt:
        DType = < fileset nickname >
        DSClass = ""
        attribute = "notify_service"
        value = ""
        rep = "s"
        DClass = ""
        DApp = < complete path to external notification program >

The program specified in DApp of the notify_service attribute is invoked when the system is managed by a Hardware Management Console (HMC). The program is invoked with the diagnostic event log sequence number of the diagnostic conclusion. The diagnostic event log API can be used to extract the specific data of the diagnostic analysis and perform any customized notifications.

The <fileset nickname> is any 15 character (or less) string that represents which fileset ships this stanza. Diagnostics does not use the nickname, but a unique value per fileset is required in DType to facilitate installing and updating the attribute because the same attribute name can be shipped in other filesets. For example, fileset devices.chrp.base.diag would ship a stanza like:

text
PDiagAtt:
        DType = "DevChrBasDia"
        DSClass = ""
        attribute = "notify_service"
        value = ""
        rep = "s"
        DClass = ""
        DApp = /usr/lpp/diagnostics/bin/diagServiceEvent

For Systems not attached to a Hardware Management Console

text
PDiagAtt:
        DType = < fileset nickname >
        DSClass = ""
        attribute = "notify_extern"
        value = ""
        rep = "s"
        DClass = ""
        DApp = < complete path to external notification program >

The program specified in DApp of the notify_extern attribute is invoked when the system is not managed by a Hardware Management Console (HMC). The program is invoked with the diagnostic event log sequence number of the diagnostic conclusion. The diagnostic event log API can be used to extract the specific data of the diagnostic analysis and perform any customized notifications.

The <fileset nickname> is any 15 character (or less) string that represents which fileset ships this stanza. Diagnostics does not use the nickname, but a unique value, per fileset, is required in DType to facilitate installing and updating the attribute because the same attribute name can be shipped in other filesets. For example, fileset devices.chrp.base.diag would ship a stanza like:

text
PDiagAtt:
        DType = "DevChrBasDia"
        DSClass = ""
        attribute = "notify_extern"
        value = ""
        rep = "s"
        DClass = ""
        DApp = /usr/lpp/diagnostics/bin/diagServiceEvent

진단 컨트롤러의 동작 흐름

diag 명령으로 실행하는 진단 컨트롤러의 동작 흐름입니다.

플래그 없이 diag 명령을 실행하면 진단 컨트롤러가 시작되어 다음을 합니다.

  1. Operating Instructions 메뉴를 보여 줍니다. 버전 번호는 설치된 진단 코드의 버전입니다.
  2. Function Selection 메뉴를 보여 주고, 사용자가 고른 항목의 명령을 시작합니다.

플래그와 함께 diag 명령을 실행하면 진단 컨트롤러가 시작되고 플래그가 컨트롤러로 넘어갑니다.

진단 컨트롤러는 다음 일을 합니다.

  1. 사용자 인터페이스를 초기화합니다. 화면과 키보드가 없으면 초기화가 실패한다고 가정합니다.
    • -a이면 구성 관리를 합니다.
    • -s이면 시스템 checkout을 한 번 합니다.
    • -S#이면 Test Suite ID가 가리키는 자원에 진단을 실행합니다.
    • 플래그가 없으면 사용자에게 묻습니다.
  2. Function Selection 메뉴에서 다음 가운데 하나를 고르게 합니다.
    • Diagnostics
    • Advanced Diagnostics
    • Task Selection 메뉴
    • Resource Selection 메뉴
  3. Diagnostics나 Advanced Diagnostics를 고르면 다음이 일어납니다.
    • Diagnostic Mode Selection 메뉴로 System Verification과 Problem Determination 가운데 무엇을 실행할지 정합니다.
    • Problem Determination을 고르면 진단 컨트롤러가 최근 7일 안에 기록된 PERMANENT HARDWARE 오류를 오류 로그에서 자동으로 찾아, 자동으로 시험해야 할 장치가 있는지 판단합니다. 문제 보고서가 만들어질 수 있습니다.
    • 구성 데이터베이스를 따라가며 현재 구성에서 시험할 수 있는 자원을 알아내 Resource Selection 메뉴에 보여 줍니다.
    • Advanced Diagnostics Routines를 골랐고 시스템이 온라인 서비스 모드이면 Test Method 메뉴로 시험을 되풀이할지 정합니다.
    • TMInput(Test Mode Input) 객체 클래스에 든 DA의 입력 매개변수를 초기화합니다.
    • 시험할 자원의 DA를 실행합니다.
    • DA가 끝날 때까지 기다립니다.
    • 그다음 격리 과정을 하고, 결론을 화면에 보여 줍니다. 문제가 없으면 진단은 반환값 0으로 끝나고, 하드웨어가 고장으로 판정되면 1을 돌려줍니다.
  4. Task Selection 메뉴를 고르면 다음이 일어납니다.
    • 시스템에서 쓸 수 있는 작업 목록을 보여 줍니다.
    • 작업을 고른 뒤 그 작업이 자원 선택을 지원하면 Resource Selection 메뉴가 나오고, 자원을 고르면 고른 자원 이름을 명령줄 인수로 주어 작업을 부릅니다.
    • 고른 작업이 자원 선택을 지원하지 않으면 바로 작업을 부릅니다.
  5. Resource Selection 메뉴를 고르면 다음이 일어납니다.
    • 시스템에서 쓸 수 있는 자원 목록을 보여 줍니다.
    • 자원을 고르면 고른 자원들이 공통으로 지원하는 작업이 든 Task Selection 메뉴가 나오고, 작업을 고르면 그 작업을 부릅니다.

반환 상태

진단 컨트롤러는 다음 값을 돌려줍니다.

이름 값 뜻
DIAG_EXIT_GOOD 0 문제 없음
DIAG_EXIT_DEVICE_ERROR 1 진단 실행 중 오류(하드웨어 고장)
DIAG_EXIT_INTERRUPT 2 진단 실행 중 인터럽트를 받음
DIAG_EXIT_NO_DEVICE 3 시험할 장치가 시스템 구성에 없음
DIAG_EXIT_BUSY 4 다른 Dctrl 프로그램이 실행 중
DIAG_EXIT_LOCK_ERROR 5 진단 컨트롤러의 잠금 파일을 만들 수 없음
DIAG_EXIT_OBJCLASS_ERROR 6 ODM 데이터베이스 접근 오류
DIAG_EXIT_USAGE 7 사용법 오류
DIAG_EXIT_SCREEN 8 화면 크기가 맞지 않음
DIAG_EXIT_NoPDiagDev 9 진단이 지원하지 않는 장치
DIAG_EXIT_NO_DIAGSUPPORT 10 진단을 지원하지 않음
DIAG_EXIT_NOT_MISSING 11 장치가 누락되지 않음
DIAG_EXIT_NO_AUTHORIZATION 12 사용자에게 진단을 실행할 권한이 없음
DIAG_EXIT_KERNSUPPORT 13 64비트 커널에서 지원하지 않는 장치
영어 원문

Control flow of the diagnostic controller

Use the topic to learn about the control flow of the Diagnostic Controller with the diag command.

Invoking the diag command without any flags starts the Diagnostic Controller which performs the following:

  1. Displays the Operating Instructions menu. The version number will reflect the version of the Diagnostic code installed.

  2. Displays the Function Selection menu, and starts the command associated with the user's selection.

Invoking the diag command with flags starts the Diagnostic Controller and passes the flags on to the Controller.

The Diagnostic Controller performs the following tasks:

  1. Initialize the user interface. It is assumed that if there is no display and keyboard, then the initialization will fail.
  • If -a, then performs configuration management.

  • If -s, then performs system checkout once.

  • If -S#, then runs diagnostics on the resources indicated by the Test Suite ID.

  • If a flag was not specified, Diagnostics prompts the user.

  1. From the Function Selection Menu, allows the user to select one of the following:
  • Select Diagnostics

  • Select Advanced Diagnostics

  • Select Task Selection Menu

  • Select Resource Selection Menu

  1. If Diagnostics or Advanced Diagnostics is selected, then the following happens:
  • The Diagnostic Mode Selection menu is displayed, to determine if System Verification or Problem Determination should be run.

  • If Problem Determination is chosen, then the Diagnostic Controller automatically scans the error log for any PERMANENT HARDWARE errors that have been logged within the last 7 days to determine if any devices should be automatically tested. A problem report may be generated.

  • Walks the configuration database to determine which resources in the current configuration can be tested. This information is presented in the Resource Selection Menu.

  • If Advanced Diagnostics Routines is chosen, and the system is in Online Service mode of operation, the Diagnostic Controller will display the Test Method menu to determine if the tests should be repeated.

  • Initializes the input parameters to the Diagnostic Application (DA), which are contained in the TMInput - Test Mode Input object class.

  • Runs the Diagnostic Application (DA) of the resource to be tested.

  • Waits for the DA to complete.

  • The Diagnostic Controller then: – Performs isolation process. – Presents conclusions to the screen. – If no trouble is found, diagnostics exits with a return value of 0. Otherwise, a value of 1 is returned if the hardware was tested bad.

  1. If Task Selection Menu is selected, then the following happens:
  • The Diagnostic Controller displays a list of Tasks that are available for the system.

  • After a task has been selected, a Resource Selection Menu appears if the selected task supports a resource selection. After selection of a Resource, the task is called with the selected resource name as a command-line argument.

  • If the selected task does not support resource selection, then the task is invoked.

  1. If Resource Selection Menu is selected, then the following happens:
  • The Diagnostic Controller displays a list of Resources available on the system.

  • After a Resource has been selected, a Task Selection Menu will appear containing the commonly supported tasks for each selected Resource. After selection of a task, the task is invoked.

Return Status

The Diagnostic Controller returns the following values:

Diagnostic Controller Value Meaning
DIAG_EXIT_GOOD 0 No problems found
DIAG_EXIT_DEVICE_ERROR 1 Error running diagnostics
DIAG_EXIT_INTERRUPT 2 Received an interrupt while running diagnostics
DIAG_EXIT_NO_DEVICE 3 Device to test was not found in system configuration
DIAG_EXIT_BUSY 4 Another Dctrl program is running
DIAG_EXIT_LOCK_ERROR 5 Cannot create lock file for diagnostic controller
DIAG_EXIT_OBJCLASS_ERROR 6 Error accessing ODM database
DIAG_EXIT_USAGE 7 Usage error
DIAG_EXIT_SCREEN 8 Screen size incorrect
DIAG_EXIT_NoPDiagDev 9 Device not supported by diagnostics
DIAG_EXIT_NO_DIAGSUPPORT 10 Diagnostics is not supported
DIAG_EXIT_NOT_MISSING 11 Device is not missing
DIAG_EXIT_NO_AUTHORIZATION 12 User is not authorized to run diagnostics
DIAG_EXIT_KERNSUPPORT 13 Device is not supported on the 64-bit kernel

진단 응용 프로그램

진단 서브시스템이 지원하는 응용 프로그램입니다.

참고: 진단 서브시스템은 32비트 진단 응용 프로그램만 지원합니다.

시스템의 자원 대부분에는 진단 컨트롤러가 시작하는 진단 응용 프로그램(DA)이 있어 그 영역을 시험합니다. DA는 구성 데이터베이스에서 진단이 지원하는 각 자원에 연결됩니다.

DA는 오류 로그를 분석하고, 사용자에게 안내와 질문을 보여 주고, 실행할 시험을 제어하고, 응용 프로그램 테스트 단위를 부르고, 시험 결과를 분석합니다.

다음 주제를 자세히 다룹니다.

영어 원문

Diagnostic applications

This topic describes the applications that are supported by the Diagnostic subsystem.

Note: The Diagnostic subsystem supports 32-bit diagnostic applications only.

Most resources in a system have a Diagnostic Application (DA), started by the Diagnostic Controller, that tests an area. DAs are associated with each resource supported by diagnostics in the configuration database.

DAs analyze the error log, display prompts and questions to the user, control which tests are run, call Application Test Units, and analyze test results.

The following topics are discussed in detail:

장치 구성

경우에 따라 DA는 장치를 시험하려고 장치를 구성해야 합니다. 장치에 연결된 구성 메서드(Configuration Method)에 장치 드라이버를 커널에 적재하고 초기화하는 코드가 없으면 DA가 이 일을 합니다.

그러나 대부분 DA는 제공되는 진단 라이브러리 함수로 구성을 할 수 있습니다. 구성·구성 해제를 돕는 라이브러리 함수는 다음과 같습니다.

  • configure_device
  • initial_state
  • diagex_cfg_state
  • diagex_initial_state

자원을 다시 구성했으면 DA가 끝나기 전에 처음 상태로 되돌려야 합니다. 또 부모 자원이 늘 구성되어 있다고 가정하면 안 됩니다.

영어 원문

Device configuration

In some cases, the DA will have to configure a device in order to test it. If the Configuration Method associated with the device does not contain the code that is required to load the device driver into the kernel and initialize it, then the DA performs this function.

However, in most cases, the DA may use one of the diagnostic library functions provided to perform the configuration. The following library functions aid in the configuration/unconfiguration process:

  • configure_device

  • initial_state

  • diagex_cfg_state

  • diagex_initial_state

If a resource is reconfigured, then it must be restored to its initial state before the DA exits. Also, never assume that the parent resource(s) are always configured.

실행할 시험 수준 정하기

각 DA는 안전하게 실행할 수 있는 시험 수준을 스스로 정해야 합니다. 이는 아래 장치 드라이버가 장치 접근을 어떻게 지원하는지에 달려 있습니다.

공유되지 않고 다중화되지 않은 장치라면 DA는 읽기/쓰기 권한으로 장치를 open()해 보아 접근 권한을 판단합니다. 공유되거나 다중화된 장치라면 더 복잡한 전략이 필요합니다. 가장 간단한 방법은(적어도 응용 프로그램 쪽에서 보면) 장치 드라이버에 openx() 시스템 호출 지원을 더하고, ext 매개변수로 포트 수준과 카드 수준 진단을 구별하는 것입니다.

영어 원문

Determining the level of tests to execute

Each diagnostic application (DA) is responsible for determining the level of tests that can be safely executed. This determination is a function of how the underlying device drivers support access to the device.

Each DA is responsible for determining the level of tests that can be safely executed. This determination is a function of how the underlying device drivers support access to the device.

For nonshared, nonmultiplexed devices, the DA should attempt to open() the device with read/write privileges and thus determine its access privileges. For shared or multiplexed devices, a more complicated strategy needs to be developed. Perhaps the simplest method - at least from an application standpoint - is to add support for an openx() system call to the device driver, where the ext parameter distinguishes between port-level and card-level diagnostics.

진단에 쓰는 드라이버

시험할 자원을 구성하는 시나리오는 여러 가지입니다. 시험할 자원과 다른 자원의 관계에 따라 어떤 방법이 더 나을 수 있습니다.

예를 들어 별도의 진단 드라이버나 커널 확장을 적재하려고 자원의 구성을 해제하려면, 그 자원에 연결된 자식 자원이 있으면 모두 구성을 해제해야 합니다. 자식 자원이 사용 중이면 문제가 될 수 있습니다. 이럴 때는 운영(production) 드라이버를 진단에 쓰는 것이 좋습니다. 어느 경우든 시험이 끝나면 자원(과 자식 자원)을 원래 상태로 되돌리는 것이 중요합니다.

방법 절차
운영 드라이버를 진단에 사용 자원이 DEFINED 상태면 시험 전에 구성해야 합니다. 구성한 뒤 자원을 시험하고, 원래 상태로 되돌려야 합니다.
별도의 진단 드라이버를 진단에 사용 자원이 DEFINED 상태면 진단 드라이버를 적재해 시험하고 끝나면 내립니다. 운영 드라이버가 적재되어 AVAILABLE 상태면, 운영 드라이버를 내리고, 진단 드라이버를 적재하고, 시험하고, 진단 드라이버를 내리고, 운영 드라이버를 다시 적재합니다. 시험할 자원의 구성을 해제하기 전에 자식 자원의 구성을 모두 해제해야 합니다.
진단 커널 확장을 진단에 사용 자원이 DEFINED 상태면 시험하려고 DIAGNOSE 상태로 만들어야 합니다. 운영 드라이버가 적재되어 AVAILABLE 상태면, 자원과 모든 자식의 구성을 해제하고, 자원을 DIAGNOSE 상태로 다시 구성해 시험한 뒤, 자원과 모든 자식을 원래 상태로 다시 구성합니다.
영어 원문

Drivers used for diagnostic purposes

There are different scenarios for configuring a resource to test. Depending on the relationship of the resource to be tested with other resources, it may be desirable to use one method over another.

For instance, to unconfigure a resource in order to load a separate diagnostic driver or kernel extension, it is necessary to unconfigure all of the children resources connected to the particular resource, if any. This could cause a problem if the child resources are in use. In this case, it is desirable to use the production driver for diagnostic purposes. In all cases, it is important to restore the resource (and child resources) to their original state after testing.

Production Driver Used for Diagnostic Purposes

If the resource is in the DEFINED state, the resource must be configured before testing. After the resource is configured, tests can be performed on the resource, and then the resource must be put back into its original state.

Separate Diagnostic Driver Used for Diagnostic Purposes

If the resource is in the DEFINED state, the diagnostic driver may be loaded for testing, then unloaded after testing. If the resource is in the AVAILABLE state because the production driver is loaded, it is necessary to unload the production driver, load the diagnostic driver, perform the tests, unload the diagnostic driver, and then reload the production driver. Any child resources must be unconfigured before the resource under test can be unconfigured.

Diagnostic Kernel Extension Used for Diagnostic Purposes

If the resource is in the DEFINED state, the resource must be put into the DIAGNOSE state for testing. If the resource is in the AVAILABLE state because the production driver is loaded, it is necessary to unconfigure the resource and all its children, reconfigure the resource into the DIAGNOSE state, test it, and then reconfigure the resource and all its children back to their original states.

자원을 더 많이 차지하기

시험을 더 해야 하면 DA는 사용자가 시험을 계속할지 판단하도록 도와야 합니다.

어떤 장치는 사용자에게 다른 창으로 가서 장치를 오프라인으로 바꾼 뒤 계속하라고 하는 것이 가장 좋습니다. 어떤 장치는 소프트웨어 종료 시그널을 보내는 것이 좋습니다. 또 어떤 장치는 시스템을 질서 있게 축소(degrade)하도록 특별히 제공된 명령을 시작하는 것이 좋습니다.

영어 원문

Acquiring a greater share of the resource

If further testing is required, then the diagnostic application (DA) should assist the user in determining if the user should proceed with the testing.

For some devices, it may be best to ask the user to switch to another window and vary the device offline before continuing. For others, it may be best to send software-terminate signals. And for still others, it may be best to start the commands that have been specifically provided to gracefully degrade the system.

오류 로그 분석

Test Mode Input 객체 클래스의 dmode 필드가 DMODE_ELA나 DMODE_PD이면 오류 로그 분석(ELA)을 해야 합니다. 오류 로그 분석은 shared 시험으로 봅니다.

시험 모드 입력 매개변수는 getdainput 서브루틴으로 얻습니다.

resource_alias 속성

DA가 여러 자원의 오류 로그를 분석해야 할 때(예: 기본 시스템 DA와 시스템 플래너, 메모리, L2 캐시 자원), 또는 머신 체크나 환경·전원 경고(EPOW) 같은 하드웨어 이벤트에 대해 기록된 오류 로그를 분석하려 할 때는, PDiagAtt 스탠자로 시험할 장치와 추가 자원 사이의 별칭(alias)을 정의해야 합니다.

예를 들어 RSPC 플랫폼의 시스템 플래너 DA는 RSPC 머신 체크 오류 처리기가 기록한 머신 체크의 오류 로그를 분석합니다. 자원 sysplanar0과 머신 체크 이벤트 MACHCHECK 사이의 별칭은 다음 PDiagAtt 스탠자로 정의합니다.

text
PDiagAtt:
  DClass = "planar"
  DSClass = "sys"
  DType = "sysplanar_rspc"
  attribute = "resource_alias"
  value = "MACHCHECK"
  rep = "n"
  DApp = ""

그래서 "MACHCHECK"에 대해 기록된 오류는 클래스·하위 클래스·유형이 "planar/sys/sysplanar_rspc"인 자원(보통 "sysplanar0")의 DA가 분석합니다. 그 자원(sysplanar0)에 대한 수리 작업은 "MACHCHECK"에 대해 기록된 오류와 연결됩니다.

다른 예로, CHRP 플랫폼의 기본 시스템 DA는 시스템 플래너, 메모리, L2 캐시 자원에 대해 펌웨어가 만든 오류 로그를 분석합니다. 다음 스탠자로 문제 판별 모드에서 오류 로그 분석을 부르고, 시스템 검증 절차 뒤 수리 작업을 오류 로그에 기록합니다.

text
PDiagAtt:
   DClass = "planar"
   DSClass = "sys"
   DType = "sysplanar_rspc"
   attribute = "resource_alias"
   value = "mem0"
   rep = "n"
   DApp = ""
PDiagAtt:
   DClass = "planar"
   DSClass = "sys"
   DType = "sysplanar_rspc"
   attribute = "resource_alias"
   value = "l2cache0"
   rep = "n"
   DApp = ""
영어 원문

Error log analysis

If the dmode field in the Test Mode Input, object class is set to either DMODE_ELA or DMODE_PD, then Error Log Analysis should be performed. Error log analysis should be considered a shared test.

The getdainput subroutine is used to get the test mode input parameters.

resource_alias attribute

When a DA needs to analyze error logs from multiple resources, like the base system DA and system planar, memory and l2 cache resources, or a DA wants to analyze error logs that are logged against hardware events, like machine checks or environmental and power warnings (EPOW), then a PDiagAtt stanza must be used to define the alias between the device under test and the additional resources.

For example, the DA for the system planar on the RSPC platform performs error log analysis for machine checks that are logged by the RSPC Machine Check Error Handler. The following PDiagAtt stanza must be used to define the alias between the resource, sysplanar0, and the machine check event, MACHCHECK.

text
PDiagAtt:
  DClass = "planar"
  DSClass = "sys"
  DType = "sysplanar_rspc"
  attribute = "resource_alias"
  value = "MACHCHECK"
  rep = "n"
  DApp = ""

Thus, any error logged against "MACHCHECK" is analyzed by the DA for the resource of the class, subclass and type of "planar/sys/sysplanar_rspc", which is typically "sysplanar0". Any repair action done for the resource (sysplanar0) is associated with the error logged against "MACHCHECK".

Another example: The Diagnostic Application for the base system on the CHRP platform performs error log analysis for the firmware generated error logs for the system planar, memory and l2 cache resources. The following stanzas are used to invoke error log analysis from Problem Determination mode and to record the repair action in the error log after the system verification procedure.

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

EEH(Enhanced Error Handling) 옵션

EEH는 PCI 버스의 적재(load)·저장(store) 작업 중 생긴 오류를 복구하는 장치입니다.

EEH는 새 POWER 프로세서 서버에 들어 있는 EADS 칩으로 가능해졌습니다. 사실상 EADS의 PCI 슬롯 하나하나가 각자의 PCI 버스입니다. 그래서 어댑터마다 격리할 수 있으며, PCI 버스 오류가 나도 다른 어댑터의 동작에 영향을 주지 않고 오류를 복구할 수 있어 유용합니다. 고장 난 어댑터를 격리하면 고장 부품이 시스템에 문제를 일으키는 것을 막고, 오류를 복구하는 동안 다른 PCI 장치는 계속 동작할 수 있습니다. 고장 부품과 오류의 성격(복구 가능·영구)은 AIX 오류 로그에 기록됩니다.

진단 응용 프로그램 인터페이스에는 pdiag_set_eeh_option, pdiag_set_slot_reset, pdiag_read_slot_reset 서브루틴이 있습니다. 이 서브루틴으로 DA가 EEH 옵션을 제대로 시험할 수 있습니다. 이 기능을 DA에서 지원하려면 다음 순서를 차례로 지켜야 합니다.

  1. I/O 어댑터 테스트 단위를 엽니다(TU_OPEN).
  2. pdiag_read_slot_reset을 불러 EEH 옵션을 지원하는지 확인합니다.
  3. 테스트 단위 전체를 실행합니다(해당 부품의 일반 테스트 단위 실행).
    • EEH 오류가 보고되고 EEH를 지원하면: pdiag_set_slot_reset을 불러 시험 중인 I/O 어댑터의 PCI 슬롯을 리셋 상태(reset active)로 하고, EEH 오류를 보고합니다.
    • EEH 오류가 보고되었는데 EEH를 지원하지 않으면: 소프트웨어 오류를 보고합니다.
  4. I/O 어댑터 테스트 단위를 닫습니다(TU_CLOSE).

지원하는 장치

다음 장치의 장치 드라이버가 EEH를 지원합니다.

분류 장치
저장 장치 어댑터 Gigabit Fibre Channel, PCI SCSI RAID 장치, PCI Ultra SCSI 장치, PCI Dual Channel Ultra3 SCSI Adapter (6203) ※, PCI Dual Channel Ultra2 SCSI Adapter (6205) ※
통신과 연결(PCI 버스) Token-Ring PCI 4/16 Adapter (2920, 4959), IBM Ethernet 10/100 Mbps (2968), 10/100 Mbps Ethernet PCI Adapter II (4962), IBM 4-Port 10/100 Base-TX Ethernet PCI Adapter (4961) ※, 10/100/1000 Base-T Ethernet PCI Adapter (2975), Gigabit Ethernet (2969), TURBOWAYS 622 Mbps PCI MMF ATM Adapter (2946), 2-Port Multiprotocol PCI Adapter (2962), 8-Port·128-Port 232/422 Async PCI Adapters (2943, 2944), IBM 64-bit/66 MHz PCI ATM 155 adapter (4953, 4957)
암호화 어댑터 IBM PCI 4758 Cryptographic Coprocessor Card (4958, 4963) ※, IBM Crypto Accelerator (4960) ※
그래픽과 기타 GXT135P Graphics Adapter (2848) ※, USB Open Host Controller (2737) ※, GXT4500P (2842) ※, GXT6500P (2843) ※

참고: ※ 표시가 붙은 장치는 버스 오류가 난 뒤 사용자가 개입해 장치를 손으로 복구해야 합니다(예: 장치 재구성). 그래픽과 USB 장치는 완전히 복구되지 않을 수 있어 재부팅해야 할 수도 있습니다. 구성 과정에서 장치에 오류가 나면 다음 구성 시도까지 장치는 defined 상태로 남습니다.

(6.1) 알려진 문제

다음 EEH 오류 레이블은 Description 필드가 잘못되어 있습니다.

레이블 잘못된 설명 올바른 설명
EEH_ERR Unable to allocate in JFS2 snapshot EEH Kernel services error
PCI_TEMP_ERR Write error on JFS2 snapshot EEH temporary error for adapter
PCI_PERM_ERR Unable to write into a JFS2 snapshot EEH permanent error for adapter

오류 로그의 다른 필드는 모두 올바르며 EEH 오류에 맞는 내용입니다. /usr/include/sys/errids.h 파일의 Error Id도 올바릅니다. IBM 서비스·지원에 연락할 때는 Error Id 필드를 씁니다. 이 레이블의 Error Id는 다음과 같습니다.

레이블 Error Id
EEH_ERR A1E9B3BF
PCI_TEMP_ERR 07AFC8D7
PCI_PERM_ERR D1E7854F
영어 원문

Enhanced Error Handling (EEH) option

EEH is an error-recovery mechanism for errors that occur during load and store operations on the PCI bus.

EEH is made possible by EADS chips incorporated in newer POWER processor-based servers. In effect, each PCI slot on the EADS is its own PCI bus. This allows each adapter to be isolated (which is useful if PCI bus errors occur because error recovery can occur without affecting the operation of other adapters). Isolating the failing adapter prevents a faulty component from causing problems on the system and allows continued operation of other PCI devices during error recovery. Information about the faulty component and nature of the error (recoverable versus permanent) is logged in the AIX Error log.

The Diagnostics Application interface includes the pdiag_set_eeh_option, pdiag_set_slot_reset, and pdiag_read_slot_reset subroutines. These subroutines provide the DA with the necessary tools for adequate testing on the EEH option. The DA Support for this feature requires that the DA perform the following sequence of instructions in order:

  1. Open I/O Adapter Test Units (TU_OPEN).

  2. Call pdiag_read_slot_reset.Verify that the EEH option is supported.

  3. Execute full suite of Test Units (normal Test Units execution for affected component).If an EEH error is reported and EEH is supported:- Call pdiag_set_slot_reset.- Set the PCI slot to reset state (reset active) for the I/O adapter being tested.- Report EEH error.If an EEH error is reported and EEH is not supported: - Report a software error

  4. Close I/O Adapter Test Units (TU_CLOSE).

Supported devices

Device Driver support for EEH is supported in the following devices.

Storage Adapters

Gigabit Fibre Channel PCI SCSI RAID Devices PCI Ultra SCSI Devices PCI Dual Channel Ultra3 SCSI Adapter (6203) * PCI Dual Channel Ultra2 SCSI Adapter (6205) *

Communications and connectivity (PCI bus type)

Token-Ring PCI 4/16 Adapter (2920 and 4959) IBM® Ethernet 10/100 Mbps (2968)

10/100 Mbps Ethernet PCI Adapter II (4962) IBM 4-Port 10/100 Base-TX Ethernet PCI Adapter (4961) * 10/100/1000 Base-T Ethernet PCI Adapter (2975) Gigabit Ethernet (2969) TURBOWAYS 622 Mbps PCI MMF ATM Adapter (2946) 2-Port Multiprotocol PCI Adapter (2962) 8-Port and 128-Port 232/422 Async PCI Adapters (2943 and 2944) IBM 64-bit/66 MHz PCI ATM 155 adapter (4953 and 4957)

Encryption Adapters

IBM PCI 4758 Cryptographic Coprocessor Card (4958 and 4963) * IBM Crypto Accelerator (4960) *

Graphics and Miscellaneous

GXT135P Graphics Adapter (2848) * USB Open Host Controller (2737) * GXT4500P (2842)* GXT6500P (2843)*

Note: The devices above that are denoted with an asterisk (*) require the user to intervene and manually recover the device after a bus error is encountered (for example, through device reconfiguration). Also, you may need to reboot Graphics and USB devices because those devices may not completely recover. If the device encounters an error during the configuration process, the device will be left in the defined state until there is a subsequent configuration attempt.

Known problems

Use the topic to discover the list of existing issues.

The following EEH error labels contain incorrect Description fields:

Table 1. Description Fields

Label Incorrect Description Correct Description
EEH_ERR Unable to allocate in JFS2 snapshot EEH Kernel services error
PCI_TEMP_ERR Write error on JFS2 snapshot EEH temporary error for adapter
PCI_PERM_ERR Unable to write into a JFS2 snapshot EEH permanent error for adapter

All other fields in the error log are correct and relevant to the EEH error. Error Ids contained in the /usr/include/sys/errids.h file are also correct. When contacting IBM service and support, please use the Error Id field. The following are the Error Ids for these labels:

Table 2. Error IDs

  • EEH_ERR — A1E9B3BF
  • PCI_TEMP_ERR — 07AFC8D7
  • PCI_PERM_ERR — D1E7854F

지속 변수

DA는 반복(loop) 모드를 지원하려고 상태 변수를 DAVars(Diagnostic Application Variables) 객체 클래스에 저장해야 합니다. DA는 반복 모드의 매 회차마다 새로 실행되므로 상태를 잃습니다.

지속 변수는 putdavar와 getdavar 서브루틴으로 저장하고 가져옵니다.

영어 원문

Persistent variables

DAs must store state variables in the DAVars, Diagnostic Application Variables, object class to support loop mode. DAs are executed for each pass of loop mode, and thus lose state.

The putdavar and getdavar subroutines are used to put or get persistent variables.

현장 교체 단위(FRU)

DA는 바꿔야 할 부품을 알리려고 FRU 버킷을 보고합니다. addfrub 서브루틴으로 구성 데이터베이스의 FRU 버킷 객체 클래스에 FRU 버킷을 더합니다.

FRU 정보의 일부로 DA는 ODM 데이터베이스에 없는 FRU의 부품 번호를 돌려줄 수 있습니다. FRU 부품 번호는 DAVars 객체 클래스에 넣습니다. 또 FRU 버킷에 하위 FRU(예: 메모리 모듈이나 도터 카드)가 들어 있으면 DA는 FRU 버킷의 일부로 그 물리·논리 위치 코드를 돌려줘야 합니다.

각 DA는 자식의 상태를 바탕으로 자신의 정상·고장 상태를 정해야 합니다. 자원은 자기 시험을 통과해도 고장으로 판정된 자식이 여럿이면 고장으로 표시될 수 있습니다.

부모가 자원 y이고 형제가 자원 z인 자원 x에서 문제가 발견되면 FRU 버킷 두 개를 내야 합니다.

  • FRU 버킷 1은 자원 x와 y, 그리고 알아낼 수 있는 케이블을 지목합니다. 케이블을 정확히 지목할 수 없으면 서비스 수리 작업에 필요할 수 있는 케이블이 함께 포함되어야 합니다.
  • FRU 버킷 2는 자원 x만, 그리고 가능하면 케이블을 지목합니다.

진단 컨트롤러는 형제의 정상·고장 상태에 따라 어느 FRU 버킷을 쓸지 정합니다. 형제가 시험을 통과하면 FRU 버킷 2를 지목합니다.

영어 원문

Field Replaceable Units (FRUs)

DAs report FRU Buckets to identify parts that need to be replaced. The addfrub subroutine is used to add a FRU bucket to the FRU Bucket object class in the configuration database.

As part of the FRU information, a FRU part number for a fru not in the ODM database can be returned by the DA. The FRU part number is placed in the DAVars object class. Also, if the FRU bucket contains a sub-FRU (for example a memory module or daughter cards), the DA must return its physical or logical location code as part of the FRU bucket.

Each DA should base its good or bad status on the status of its children. A resource may pass its tests and be labeled bad when it has multiple children that have been labeled bad.

If a problem is detected with resource x, which has a parent called resource y and a sibling called resource z, then two FRU Buckets should be output.

  • FRU Bucket 1 should identify the resources x and y, and any cables that can be identified. If the cables cannot be uniquely identified, then the Service Repair Action should implicitly include any cables that may be needed.

  • FRU Bucket 2 should only identify resource x and any cables if possible.

The Diagnostic Controller decides which FRU Bucket to use, based on the good/bad status of the sibling. If the sibling passes its tests, then FRU Bucket 2 is named.

글로 된 결론 지정하기

DA는 결론으로 메뉴를 지정할 수도 있습니다. 고객이 직접 수리 작업을 할 수 있으면 메뉴를 지정해야 합니다. 예를 들어 하드 디스크를 포맷해 문제를 풀 수 있으면 메뉴를 지정합니다.

menugoal 서브루틴이 Menugoal 객체 클래스에 메뉴 목표를 더해 이 일을 합니다.

영어 원문

Specifying a text conclusion

DAs can also specify a menu as a conclusion. A menu should be specified if the repair action can be performed by the customer. For example, if the problem can be solved by formatting a hard disk, then a menu should be specified.

The menugoal subroutine performs this function by adding the menu goal to the Menugoal object class.

진단 프로그램의 라이브러리 제한

libc.a.min 라이브러리는 독립 실행형 진단 패키지에 들어 있는 libc입니다. 응용 프로그램에서 libc.a.min에 없는 함수를 쓰면 안 됩니다. 진단 프로그램에서 libc.a.min이 내보내지 않는 기호의 함수를 쓰면, 독립 실행형 진단 모드에서 진단 프로그램을 실행하려 할 때 바로 소프트웨어 오류(803-xxx)가 납니다.

진단 응용 프로그램이 쓰는 모든 기호가 독립 실행형 환경에 있도록 하려면 /usr/ccs/lib 디렉터리의 libc.a.min 라이브러리로 응용 프로그램 코드를 컴파일하고 링크합니다.

한 가지 방법은 링크에 필요한 라이브러리가 든 디렉터리를 만드는 것입니다.

  1. libodm.a, libcfg.a, libcrypt.a 라이브러리를 새 디렉터리에 복사합니다.
  2. 새 디렉터리에 /usr/ccs/lib/libc.a.min을 가리키는 libc.a 링크를 만듭니다.
  3. 새 디렉터리에 /usr/ccs/lib/libc.a.min을 가리키는 libbind.a 링크를 만듭니다.
  4. LIBPATH를 새 디렉터리로 export합니다.
  5. 응용 프로그램을 컴파일하고 링크합니다.

libasl처럼 알고 있는 곳에서 오는 해결되지 않은 기호는 무시해도 됩니다.

해결되지 않은 기호 오류가 나면 고쳐야 독립 실행형 진단 모드에서 프로그램이 제대로 실행됩니다.

영어 원문

Library restrictions for diagnostic programs

Library libc.a.min is the libc included in the standalone diagnostic package. Do not use any function that is not part of libc.a.min in your application. If a function is used in a diagnostic program that is not an exported symbol of libc.a.min, then an immediate software error (803-xxx) occurs when attempting to run the diagnostic program in standalone diagnostic mode.

To ensure that all symbols used by your diagnostics application are included in the standalone environment, compile and link the application code with the libc.a.min library found in the /usr/ccs/lib directory.

One method is to create a directory containing the libraries needed for linking:

  1. Copy libraries libodm.a, libcfg.a, and libcrypt.a to the new directory.

  2. Make a link from /usr/ccs/lib/libc.a.min to libc.a in the new directory.

  3. Make a link from /usr/ccs/lib/libc.a.min to libbind.a in the new directory.

  4. Export LIBPATH to the new directory.

  5. Compile and Link your application.

You can ignore any unresolved symbols coming from libasl, or others that you know about.

Errors found indicating unresolved symbols must be fixed before the program will properly execute in standalone diagnostics mode.

C++로 진단 프로그램을 쓸 때의 지침

  1. 표준 라이브러리 libC.a는 지원하지 않습니다. 이 라이브러리의 API를 쓰지 마십시오.
  2. libC.a의 언어 지원 함수는 모두 컴파일할 때 정적으로 링크해야 합니다. xlC로 컴파일할 때 -lCns.a와 -bI:/usr/lpp/xlC/lib/libC.imp 인수를 씁니다.
  3. 예외는 예외적인 경우에만 씁니다. 예를 들어 프로그램의 일반적인 제어 흐름에 예외를 쓰면 안 됩니다.
  4. 공유 라이브러리와 실행 파일의 경계를 넘어 예외를 던지면 안 됩니다.
  5. 커널 확장은 C++로 쓰면 안 됩니다.
영어 원문

Guidelines for writing diagnostic programs using C++

  1. The standard library libC.a is not supported. Do not use this library's API.

  2. All of the language support functions in libC.a need to be statically linked at compile time. Use -lCns.a and -bI:/usr/lpp/xlC/lib/libC.imp arguments to compile with xlC.

  3. Use an exception only for exceptional cases. For example, an exception should not be used for a program's normal flow of control.

  4. Never throw an exception across a shared library and executable boundaries.

  5. No kernel extension shall be written in C++.

진단 응용 프로그램의 완료 상태

DA는 DA_EXIT() 매크로로 끝내야 합니다.

개별 값은 해당 DA_SETRC_XXXXXX() 매크로로 설정합니다.

정의된 값은 다음과 같습니다.

값 뜻
DA_STATUS_GOOD 문제를 찾지 못했습니다.
DA_STATUS_BAD FRU 버킷이나 메뉴 목표를 보고했습니다.
DA_USER_NOKEY 특수 기능 키를 입력하지 않았습니다.
DA_USER_EXIT 사용자가 Exit 키를 눌렀습니다.
DA_USER_QUIT 사용자가 Cancel 키를 눌렀습니다.
DA_ERROR_NONE 메뉴 표시, 객체 저장소 접근, 메모리 할당 같은 일반 작업에서 오류가 없었습니다.
DA_ERROR_OPEN 장치를 열 수 없었습니다.
DA_ERROR_OTHER 일반 작업에서 오류가 났습니다.
DA_TESTS_NOTEST 시험을 실행하지 않았습니다.
DA_TEST_FULL full 시험을 실행했습니다.
DA_TEST_SUB subtest를 실행했습니다.
DA_TEST_SHR shared 시험을 실행했습니다.
DA_MORE_NOCONT 격리 과정이 끝났습니다.
DA_MORE_CONT 장치로 가는 경로를 시험해야 합니다. 다음에 부를 DA는 미리 정의된 진단 자원 객체 클래스(PDiagRes)의 DNext 값에 따라 부모나 형제입니다.
영어 원문

Completion status for diagnostic applications

DAs must issue the macro DA_EXIT() to exit.

Individual values can be set by calling the appropriate DA_SETRC_XXXXXX() macro definition.

The following values are defined:

  • DA_STATUS_GOOD — No problems were found.
  • DA_STATUS_BAD — A FRU Bucket or a Menu Goal was reported.
  • DA_USER_NOKEY — No special function keys were entered.
  • DA_USER_EXIT — The Exit key was entered by the user.
  • DA_USER_QUIT — The Cancel key was entered by the user.
  • DA_ERROR_NONE — No errors were encountered performing a normal operation such as displaying a menu, accessing the object repository, and allocating memory.
  • DA_ERROR_OPEN — Could not open the device.
  • DA_ERROR_OTHER — An error was encountered performing a normal operation.
  • DA_TESTS_NOTEST — No tests were executed.
  • DA_TEST_FULL — The full tests were executed.
  • DA_TEST_SUB — The subtests were executed.
  • DA_TEST_SHR — The shared tests were executed.
  • DA_MORE_NOCONT — The isolation process is complete.
  • DA_MORE_CONT — The path to the device should be tested. The next DA to be called is either the parent or sibling, depending on the value of DNext in the Predefined Diagnostic Resources PDiagRes object class.

진단 응용 프로그램의 동작 흐름

DA는 다음 일을 합니다.

  1. 첫 대기(stand-by) 메뉴를 보여 줍니다.
  2. TMInput 객체 클래스에서 입력을 얻습니다.
  3. TMInput 객체 클래스의 state1, state2 변수를 보고 현재 세션에서 시험한 자식 장치가 고장인지 판단합니다. 고장이면 부모를 고장으로 지목해야 합니다.
  4. 실행할 시험 수준을 정합니다.
  5. TU_OPEN을 부릅니다.
  6. 응용 프로그램 테스트 단위(TU)를 부릅니다.
  7. TU_CLOSE를 부릅니다.
  8. DA가 장치를 구성했으면 장치를 다시 원래대로 구성합니다.
  9. TMInput 객체 클래스의 dmode 변수가 PD나 ELA이면 오류 로그 분석을 합니다.
  10. DA_EXIT() 매크로로 진단 컨트롤러에 상태를 돌려줍니다.
영어 원문

Control flow of a diagnostic application

The DA performs these tasks:

  1. Displays first stand-by menu.

  2. Obtains its input from the TMInput object class.

  3. References the state1 and state2 variables in the TMInput object class to determine if the child devices which were tested during the current session are defective. If so, then the DA should name the parent as being bad.

  4. Determines the level of tests to run.

  5. Calls TU_OPEN.

  6. Calls Application Test Units (TU).

  7. Calls TU_CLOSE.

  8. Reconfigures the device if DA caused it to be configured.

  9. Performs error-log analysis if the dmode variable in the TMInput object class is equal to PD or ELA.

  10. Returns status to the Diagnostic Controller through the DA_EXIT() macro call.

SRN 체계

진단 응용 프로그램은 SRN(Service Request Number)으로 문제를 보고합니다. SRN의 형식은 다음과 같습니다.

  • 6자리 SRN은 세 자리씩 두 묶음을 "-"로 나눈 것입니다(예: 922-101). 앞 세 자리를 소스 번호(source number), 뒤 세 자리를 이유 코드(reason code)라고 합니다. 소스 번호는 SRN을 낸 진단 응용 프로그램을 식별하는 유일한 번호이며, 보통 구성 데이터베이스의 PdDV 객체 클래스 LED 필드와 같습니다. 어떤 이유로 LED 값을 쓸 수 없는 진단 응용 프로그램은 중복되지 않도록 값을 배정받아야 합니다. 이유 코드는 진단 응용 프로그램이 찾은 특정 고장 원인을 나타냅니다.
  • 그 밖의 SRN 유형은 addfrub 서브루틴 설명을 봅니다.

6자리 SRN은 FRU 호출 묶음이 같은 것끼리 모이도록 묶어야 합니다. 예를 들어 진단 응용 프로그램의 호출이 다음과 같다면

  • FRU A에 대한 SRN 10개
  • FRU B에 대한 SRN 20개
  • FRU A가 가장 유력하고 다음이 FRU B인 SRN 5개
  • FRU B가 가장 유력하고 다음이 FRU A인 SRN 6개

SRN을 다음처럼 묶습니다.

SRN 범위 FRU
921-111 ~ 921-120 FRU A
921-131 ~ 921-150 FRU B
921-211 ~ 921-215 FRU A, FRU B
921-221 ~ 921-226 FRU B, FRU A

특별한 정보에서 해석하지 않는 SRN 소스 번호 700799, 811999의 이유 코드 지침은 다음과 같습니다.

이유 코드 쓰임
000 예약
001 어댑터나 장치를 찾을 수 없음
002 ~ 100 예약
101 ~ 199 FRU 하나인 ELA 아닌 호출
200 ~ 299 FRU 둘인 ELA 아닌 호출
300 ~ 399 FRU 셋인 ELA 아닌 호출
400 ~ 499 FRU 넷 이상인 ELA 아닌 호출
500 ~ 599 열 장치가 식기를 기다리거나 장치 수준을 확인하는 것처럼 특별한 조치가 필요한 ELA 아닌 경우
600 ~ 699 FRU 하나인 ELA 호출
700 ~ 799 FRU 둘 이상인 ELA 호출
800 ~ 899 특별한 조치가 필요한 ELA 경우
900 ~ 999 예약

이렇게 해서 FRU가 같은 SRN을 SRN 표의 한 항목으로 묶습니다.

영어 원문

SRN architecture

Diagnostic applications report problems through SRNs (Service Request Numbers). SRNs take the following forms:

  • Six-digit SRNs consist of two grouping of three digits seperated by the character "-" (for example, 922-101, where the first group of three digits is referred to as the source number. The second group of three digits is referred to as the reason code. The source number is a unique number that identifies the diagnostic application that produced the SRN. The source number is usually synonymous with the LED field of the PdDV object class of the configuration database. For a diagnostic applications that can not use the LED value, for whatever reason, a value must be assigned to avoid duplication. The reason code can be used to identify a particular failure cause detected by the diagnostic application.

  • Other SRN Types. See the addfrub subroutine for details.

Six-digit SRNs should be grouped so that each set of FRU callouts are grouped together. For example, if a Diagnostic Application callout consists of:

  • 10 SRNs for FRU A

  • 20 SRNs for FRU B • 5 SRNs for FRU A most likely with FRU B next • 6 SRNs for FRU B most likely with FRU A next

Then the SRNs should be grouped like the following:

  • 921-111 to 921-120 FRU A

  • 921-131 to 921-150 FRU B

  • 921-211 to 921-215 FRU A FRU B

  • 921-221 to 921-226 FRU B FRU A

The guidelines for the Reason Codes for SRN Source Numbers 700 to 799 and 811 to 999 that are not decoded from some type of special information are:

  • 000 — Reserved
  • 001 — Indicates that an adapter or device could not be found
  • 002 to 100 — Reserved
  • 101 to 199 — Reserved for non-ELA callouts with a single FRU
  • 200 to 299 — Reserved for non-ELA callouts with two FRUs
  • 300 to 399 — Reserved for non-ELA callouts with three FRUs
  • 400 to 499 — Reserved for non-ELA callouts with four or more FRUs
  • 500 to 599 — Reserved for non-ELA cases that require a special action such as waiting for a thermal device to cool or checking the level of a device.
  • 600 to 699 — Reserved for ELA callouts with a single FRU
  • 700 to 799 — Reserved for ELA callouts with two or more FRUs
  • 800 to 899 — Reserved for ELA cases that require a special action, such as waiting for a thermal device to cool or checking the level of a device.
  • 900 to 999 — Reserved

This is done to group the SRNs with like FRUs into one entry in the SRN Tables.

진단 컨트롤러가 만드는 SRN

설명 열의 이벤트가 일어나면 진단 컨트롤러가 만드는 SRN입니다.

참고: 표의 "xxx"는 실행한 진단 응용 프로그램의 소스 번호입니다.

SRN 뜻
802-xxx 진단이 설치된 장치를 찾지 못했습니다(온라인 진단).
803-xxx 진단 시험과 관계없는 오류가 났습니다.
804-xxx 진단 응용 프로그램에서 중단(halt)이 일어났습니다.
801-101, 801-102 진단이 설치된 장치를 찾지 못했습니다(독립 실행형 진단).
영어 원문

Diagnostic controller generated SRNs

The following table lists SRN generated by the diagnostic controller when the event shown in the description column occurs.

Note: "xxx" in the following table represents the source number of the diagnostic application that executed.

  • 802-xxx — The diagnostic did not detect an installed device (Online Diagnostics).
  • 803-xxx — An error not related to the diagnostic tests occurred.
  • 804-xxx — A halt occurred in the diagnostic application.
  • 801-101 801-102 — The diagnostics did not detect an installed device (Standalone Diagnostics).

소스 번호

다른 회사(third party) 공급자가 쓰도록 정의된 소스 번호입니다.

참고: 어떤 장치의 PdDV 객체 클래스 LED 필드가 아래 표의 소스 번호와 다르면 LED가 우선합니다. 표의 소스 번호는 16진수입니다.

소스 번호 장치
661 IDE 테이프 드라이브
66a USB Open Host Controller 유형
66b USB Universal Host Controller 유형
74b ATM 어댑터
74d 사운드 카드
74e 파이버 채널 어댑터
892 그래픽 디스플레이 어댑터
893 LAN 어댑터
894 비동기 프로토콜 어댑터
901 SCSI 프로토콜 장치
902 그래픽 디스플레이
904 병렬 포트 연결 장치
753 IDE CD-ROM 드라이브
891 SCSI 장치 어댑터
752 IDE 디스크 드라이브
805 CD 읽기/쓰기 드라이브
711 일반 어댑터(위에 없는 것)
영어 원문

Source numbers

The following source numbers are defined for use by third party vendors.

Note: If the LED field of the PdDV object class for a particular device is different than the source number shown in the table below, the LED takes precedence. Source Numbers shown in the following table are hexadecimal values.

  • 661 — IDE Tape Drive
  • 66a — USB Open Host Controller Type
  • 66b — USB Universal Host Controller Type
  • 74b — ATM Adapter
  • 74d — Sound Card
  • 74e — Fibre Channel Adapter
  • 892 — Graphics Display Adapter
  • 893 — Local Area Network (LAN) Adapter
  • 894 — Async Protocol Adapter
  • 901 — SCSI Protocol Device
  • 902 — Graphics Display
  • 904 — Parallel Port Attached Device
  • 753 — IDE CD ROM Drive
  • 891 — SCSI Device Adapter
  • 752 — IDE Disk Drive
  • 805 — CD Read/Write Drive
  • 711 — Generic Adapter (Not covered above)

진단 응용 프로그램 코드 점검표

다음 점검표는 진단 응용 프로그램(DA) 코드를 제대로 만드는 데 도움이 됩니다.

  1. 다음 조건에서 정상 장치 경로(GMP, Good Machine Path) 시험을 비정상 종료(abend)나 SRN 없이 실행해야 합니다.
    • IPL 모드: 하드 디스크에서 Service로
    • Advanced 모드 선택
    • PD 모드 선택
    • 한 번 실행
    • DA가 보여 주는 지시를 모두 따릅니다. 화면의 질문이 분명하지 않으면 모호한 점을 적어 두고 이해한 대로 답합니다. 필요하면 랩 플러그(wrap plug)를 쓰고 케이블을 뽑습니다. 철자 오류와 문법 오류를 찾습니다.
  2. 다음 조건에서 GMP 시험을 비정상 종료나 SRN 없이 실행해야 합니다.
    • IPL 모드: CD-ROM에서 Service로
    • Advanced 모드, PD 모드, 한 번 실행
    • 필요하면 랩 플러그를 쓰고 케이블을 뽑습니다.
  3. 다음 조건에서 GMP 시험을 비정상 종료나 SRN 없이 실행해야 합니다.
    • IPL 모드: Normal
    • 명령줄에서 콘솔 없는 모드로 진단 실행: diag -cd 장치
    • 명령줄에서 콘솔 없는 Advanced 모드로 진단 실행: diag -Acd 장치
  4. 다음 조건에서 GMP 시험을 비정상 종료나 SRN 없이 실행해야 합니다.
    • IPL 모드: 하드 디스크에서 Service로
    • PD 모드, Advanced 모드, ALL Resources 선택
    • DA가 보여 주는 지시를 모두 따르고, 응용 프로그램이 실행되는 동안 대화형 메뉴가 나오지 않는지 봅니다.
영어 원문

Diagnostic application code checklist

The following checklist can be helpful in ensuring successful Diagnostic Application (DA) code.

  1. Code must execute Good Machine Path (GMP) testing without abending or returning an SRN under the following conditions: a. IPL Mode: Service from hard disk. b. Select Advanced mode. c. Select PD mode. d. Run a single time. Follow all instructions presented by the DA. If the question presented on a screen is unclear, note the ambiguity and answer the question as you understand it. Use wrap plugs where required. Unplug cables as required. Look for: a. Spelling errors b. Grammatical errors

  2. Code must execute GMP testing without abending or returning an SRN under the following conditions: a. IPL Mode: Service from CD-ROM. b. Select Advanced mode. c. Select PD mode. d. Run a single time. Use wrap plugs where required. Unplug cables as required.

  3. Code must execute GMP testing without abending or returning an SRN under the following conditions: a. IPL Mode: Normal. b. Run diagnostics from command line in no-console mode. diag -cd device c. Run diagnostics from command line in no-console Advanced mode. diag -Acd device

  4. Code must execute Good Machine Path (GMP) testing without abending or returning an SRN under the following conditions: a. IPL Mode: Service from hard disk. b. Select PD mode. c. Select Advanced mode. d. Select ALL Resources. Follow all instructions presented by the DA. If the question presented on a screen is unclear, note the ambiguity and answer the question as you understand it. Look for: No interactive menus displayed while the application is executing.

그 밖의 시험 시나리오

  1. 장치를 DEFINED 상태로 만든 뒤 진단을 실행해 DA가 장치를 사용 가능하게 만드는지 확인합니다. 시험이 끝나면 어댑터가 다시 DEFINED 상태로 돌아왔는지 확인합니다.
  2. 장치가 마이크로코드를 쓰면 마이크로코드 파일 이름을 바꾸고 DA를 실행해, DA가 파일이 없다고 보고하는지 확인합니다.
  3. 장치에 Advanced Diagnostics를 실행합니다. 랩 플러그를 쓰라고 할 때 쓰지 않아 SRN이 생기는지 확인합니다. 또는 SRN이 보고되게 하는 무엇이든 하고, SRN이 정확한지 확인합니다.
  4. 장치 드라이버 이름을 바꿔 열기 오류를 일으키고, 소프트웨어 오류가 보고되는지 확인합니다.
  5. 어댑터를 DEFINED 상태로 두고 메서드 이름을 바꿔 구성이 실패하게 합니다. DA가 어떻게 처리하는지 봅니다. 대부분 장치를 구성할 수 없다는 SRN이 생겨야 합니다.
  6. 지원하는 시스템의 두 번째 I/O 플래너에 어댑터를 꽂습니다. 어댑터가 DEFINED 상태인지 확인하고 진단을 실행해 DA가 장치를 사용 가능하게 만드는지 확인합니다. 시험이 끝나면 어댑터가 다시 DEFINED 상태로 돌아왔는지 확인합니다.
영어 원문

Other test scenarios

  1. Bring the device to the DEFINED state; then run diagnostics to ensure the DA causes the device to be made available. After testing is completed, ensure adapter is placed back in the DEFINED state.

  2. If microcode is used by the device, rename the microcode file, run the DA, and make sure the DA reports the absence of the file.

  3. Run Advanced Diagnostics on the device. When a wrap plug is called for, do not use it. Make sure an SRN is generated. Alternatively, do anything that causes an SRN to be reported. Check the SRN for accuracy.

  4. Try to cause an open error by renaming device driver. Ensure that a software error is reported.

  5. Place the adapter in the DEFINED state. Cause the configuration to fail by renaming the method. Observe how the DA handles this. In most instances, an SRN should be generated stating that the device could not be configured.

  6. Place the adapter in the second I/O planar of a supported system. Ensure the adapter is in the DEFINED state. Run diagnostics to ensure the DA causes the device to be made available. After testing is completed, ensure adapter is placed back in the DEFINED state.

자주 쓰는 형태

bash
odmget -q "attribute=notify_extern" PDiagAtt     # 진단 결과 외부 통지 등록 확인
ls -l /etc/lpp/diagnostics/data                   # 진단 컨트롤러 분석 결과
diag -c -d ent0; echo "rc=$?"                     # 0 정상, 1 고장, 3 장치 없음 …
errpt -J EEH_ERR,PCI_TEMP_ERR,PCI_PERM_ERR        # EEH 오류