The Diagnostic Package contains ODM object classes that are used extensively by the Diagnostic components. Some object classes store 'predefined' diagnostic information about the system and resources. Other object classes store 'customized' information that is built and used during runtime operation of diagnostics.
The following is a list of the Diagnostic ODM object classes:
The Predefined Diagnostic Resource object class (PDiagRes) identifies the resources supported by diagnostics and provides additional information needed to test the resource.
The PDiagRes object class structure is defined as:
class PDiagRes { char Uniquetype[48]; short Ports; short PSet; short PreTest; char AttUniquetype[48]; short SupTests; short Menu; short DNext; vchar DaName[255]; char PkgBlock[5]; vchar EnclDaName[255]; vchar SysxApp[255]; vchar SupTasks[255]; long FFC; short Fru; long TestSuiteId; long DiagEnvironment; vchar KernExt[255]; char Version[5]; };
Parmeter | Description |
---|---|
Uniquetype | Predefined device "class/subclass/type." |
Ports | Indicates if the device will be represented in the Resource Selection
menu by its children. The intent is to use device names that are well known
to the user (for example, printers rather than serial ports). The values are
as follows:
When determining whether a child device should be defined, consider whether the device is self-determining. Will the mkdev command be unsuccessful if the device is not really there? |
PSet | Identifies the message set in either dcda.cat or
the diagnostic application catalog file reserved for the device. If the Ports field is not equal to 0, the first message in the
set describes the adapter port. This adapter text is used in place of the
real device text so that the customers are not misled into thinking that they
have devices that are not actually present. The additional messages are used
for reason-code text, which the DAs name when reporting FRUs.
The diagnostic application catalog file should be used by all diagnostic applications integrated into the Diagnostic Package. This capability allows for greater flexibility in installing and maintaining the diagnostic code. To use this catalog file, set bit DIAG_DA_SRN in the Menu field. |
PreTest | Indicates that the device should be tested before the system is brought up. Pretest occurs when the system is initial-program loaded with the key in service position. The keyboard device, native serial ports, and display adapters are normally pretested. |
AttUniquetype | The device class/subclass/type of the child device to define when the Ports field is set. The device named should include a set of device drivers that contain support for diagnostics. |
SupTests | Identifies the types of tests supported by the DA. See Staging the Impact of Diagnostics for more information. More than one
of the following types may be specified:
|
Menu | Identifies the diagnostic menus in which the device should be included.
The values are as follows:
|
DNext | Indicates the resource to be tested next. The values are as follows:
|
DaName | The name of the DA associated with the device. |
PkgBlock | The block number that includes the DA associated with the device for the Removable Media Diagnostic package. This value should be an "S" if the DA is on a Supplemental Diskette, or a "3S" if the DA is a graphics adapter that can be used as a console device. |
EnclDaName | This field names a DA that provides missing-device analysis for an
enclosure that is not explicitly represented in the device configuration,
but that needs to be processed before the missing device. Many enclosures
have their own problem-determination procedures for checking cabling, power,
idiot lights, and so on, and frequently, it is helpful to know if a sibling
of the missing device in the same enclosure is available.
The specification of a separate DA to missing-device diagnostics for devices not represented (for example, external enclosures or drawers) centralizes this logic in a single command instead of distributing it among each DA supporting a device that can operate in a bridge box or drawer. For most devices, this field is null. The Diagnostic Controller calls the EnclDaName field, if the user indicates that the device has not been moved or turned off. The EnclDaName field is called before DaName. |
SysxApp | Identifies the application to invoke that performs a system exerciser function for this resource. While not currently used, this is a reserved field, and should be left blank. |
SupTasks | Reserved. This field is retained for compatibility and should not be used. For more information, see Predefined Diagnostic Attribute Device. |
FFC | Failing Function Code for the resource. (may be used to override the PdDv led value) |
Fru | Field Replaceable Unit indicator. (may be used to override the PdDv fru value):
|
TestSuiteId | Bit mask indicating test suite this resource is a member of: |
DiagEnvironment | Bit mask indicating various test mode environments this resource is
capable of running in:
|
KernExt | ',' separated list of kernel extensions to load for this resource. Each kernel extension may be preceded by a platform type to indicate the platform that the kernel extension should be loaded on. For example, chrp:device_kext, pdiagex would indicate to always load pdiagex, and to conditionally load device_kext only on a 'chrp' platform. The platform name is derived as the output from the bootinfo -p command. |
Version | Version change number for this resource stanza. This value should be 1.0. |
The Predefined Diagnostic Attribute Device object class (PDiagAtt) contains device- specific attributes for the DAs, diagnostic controller, and service aids to use.
The PDiagAtt object class structure is defined as:
class PDiagAtt { char DClass[16]; char DSClass[16]; char DType[16]; char attribute[16]; vchar value[255]; char rep[8]; vchar DApp[255]; };
Parmeter | Description |
---|---|
DClass | Predefined device class. Devices are uniquely identified by a combination of DClass, DSClass, and DType. |
DSClass | Predefined device sub-class. Devices are uniquely identified by a combination of of DClass, DSClass, and DType. |
DType | Predefined device type. |
attribute | 16-byte char field. The attribute value used by service aids to determine test mode for devices is test_mode. Uses value field. |
value | 255-byte variable char field. |
rep | 8-byte char field. |
DApp | 255-byte variable char field. |
Each field has specific meaning to each application that utilizes the Predefined Diagnostic Attribute Device object class (PDiagAtt).
EXAMPLES:
PDiagAtt: DClass = "disk" DSClass = "scsi" DType = "" attribute = "SupTasks" value = "1,2,7,8,9,10,13,14,16,31,33" rep = "s" PDiagAtt: DClass = "disk" DSClass = "scsi" DType = "355mb" attribute = "SupTasks" value = "1,2,7,8,9,10,13,14,31,33" rep = "s"
The search order performed by the Controller when determining the tasks a resource supports is as follows:
DClass, DSClass, DType DClass, DSClass DClass
In the above example, if the disk type is 355mb, a match on the first call to search ODM is made; if not, a match will be made on the second call.
PDiagAtt: DClass = "diskette" DSClass = "siofd" DType = "fd" attribute = "format" value = "" rep = "s" DApp = "ufd"
PDiagAtt: DType = "Dctrl" attribute = "version" value = "4.3.4" #This is the diagnostic #version level seen on #the Operating #Instructions Menu. rep = "s"
PDiagAtt: DType = "2b101a05" DSClass = "pci" attribute = "NoScreen" value = "/usr/lpp/diagnostics/da/dsage -P" rep = "NotOpen" DClass = "adapter" DApp = "u5081"
The service aid that uses this stanza is /usr/lpp/diagnostics/bin/u5081. The command that is built and executed is:
/usr/lpp/diagnostics/da/dsage <device name> -P
PDiagAtt: DType = "" DSClass = "" attribute = "platform_task+" value = "101,102,110" rep = "" DClass = "" DApp = "rspc"
In the example above, the tasks whose IDs are 101, 102 and 110 will be included in the task list on an ISA-bus based platform. Multiple PDiagAtt stanzas with the platform_task+ attribute are allowed.
The Predefined Diagnostic Task object class (PDiagTask) identifies the tasks supported by diagnostics and provides additional information needed to execute the task.
The PDiagTask object class structure is:
class PDiagTask { long TaskId; long SetId; long MsgId; long Multisession; short Order; long ResourceFlag; long DiagEnvironment; short Builtin; vchar Action[255]; vchar Catalog[255]; vchar KernExt[255]; short DescriptionSetId; short DescriptionMsgId; char PkgBlock[5]; };
The Customized Diagnostic Attribute object class (CDiagAtt) contains customized entries for selected devices found in the current configuration, which is supported by diagnostics. The CDiagAtt object class indicates specialized diagnostic attribute status of the device. It is used to maintain diagnostic information about devices found in the current configuration across sessions.
The CDiagAtt object class structure is defined as:
class CDiagAtt { char name[16]; char attribute[16]; vchar value[255]; char type[8]; char rep[8]; };
Parmeter | Description |
---|---|
name | Resource name as specified in CuDv. |
attribute | 16-byte char field. The attribute value used by the Controller to identify persistent state data for the device. Uses value field. |
value | 255-byte variable char field. |
type | 8-byte char field specifying data type. |
rep | 8-byte char field. |
CDiagAtt: name = "hdisk0" Resource to test attribute = "p_test_time" Attribute: periodic-test-time value = "0300" Test time ( 3AM ) type = "T" Data type of 'text' rep = "s" 'String' representation CDiagAtt: name = "ent0" Resource name attribute = "p_test_time" value = "9999" Not tested indication type = "T" rep = "s"
CDiagAtt: name = "mem0" Resource name attribute = "not_in_tst_list" Device has been deleted from value = "1" the Resource List type = "T" rep = "n"
The input parameters to the Diagnostic Application are stored in the TMInput object class. The subroutine getdainput should be used to retrieve the test mode input data values from this object class.
The TMInput object class structure is defined as:
class TMInput { short exenv; short advanced; short system; short dmode; char date[80]; short loopmode; short lcount; short lerrors; short console; char parent[16]; char parentloc[16]; char dname[16]; char dnameloc[16]; char child1[16]; short state1; char childloc1[16]; char child2[16]; short state2; char childloc2[16]; long pid; short cpuid; };
Parmeter | Description |
---|---|
exenv | The execution environment. Possible values include the following:
|
advanced | Derived from the Function Selection menu. Possible values include
the following:
|
system | Derived from the Diagnostic or Resource Selection menu. Possible values
include the following;
|
dmode | The diagnostic mode indicates the type of analysis that should be undertaken.
Possible values include the following:
|
date | The date from which the error log should be scanned. For the syntax used to describe the data, see the date command. |
loopmode | The maintenance mode and service mode diagnostic package supports loop
testing. All or part of the system can be tested multiple times. Possible
values include the following:
|
lcount | Number of passes in loop mode that have been completed. |
lerrors | Number of errors logged while in loop mode. |
console | Diagnostic Controller queries the database to determine if the default
console has been configured. Configuration states include:
|
parent | Name of the parent of dname. |
parentloc | Location of parent. Format of string is "00-00-00-00". |
dname | Name of the device to be tested. |
dnameloc | Location of dname. Format of string is "00-00-00-00". |
child1 | Name of the child device that has already been tested. Relevant for Option Checkout only. |
childloc1 | Location of child1. Format of string is "00-00-00-00". |
state1 | State associated with child1. The resource states include:
|
child2 | Name of another child device that has already been tested. Relevant for Option Checkout only. |
childloc2 | Location of child2. The format of the string is "00-00-00-00". |
state2 | State associated with child2. The resource states include:
|
pid | Process ID of the DA when started from the Controller. |
cpuid | Logical processor number plus one which the DA when started from the Controller should bind itself to. While not currently used, this is a reserved field, and should be left blank. |
All values can be found in /usr/include/diag/tmdefs.h.
The Menu Goal object class (MenuGoal) is used to store additional text information that the Diagnostic Application wants to pass back to the Diagnostic Controller. This text information is displayed to the user. This information is usually additional information that would be useful to the user concerning the state of the resource. One example would be that the Tape Drive requires cleaning.
All applications using the MenuGoal capability must use the menugoal diagnostic library subroutine.
The MenuGoal object class structure is defined as:
class MenuGoal { char dname[16]; longchar tbuffer1[1000]; longchar tbuffer2[1000]; };
Parmeter | Description |
---|---|
dname | Resource name as specified in CuDV |
tbuffer1 | Buffer used to store 1000 bytes of text |
tbuffer2 | Buffer used to store 1000 bytes of text |
The Fru Bucket Object Class (FRUB) is used to store failing replaceable unit information. This information is specified by the Diagnostic Application and passed back to the Diagnostic Controller after an error has been detected.
All applications using the FRU capability must use the addfrub diagnostic library subroutine.
The FRUB object class structure is defined as:
class FRUB { char dname[16]; short ftype; short sn; short rcode; short rmsg; char timestamp[80]; };
Parmeter | Description |
---|---|
dname | Names the device under test. |
ftype | Indicates the type of FRU Bucket being added to the system. The following
values are defined:
|
sn | Source number of the failure. |
rcode | Reason code associated with the failure.
Note
A Service
Request Number is formatted as follows:
SSS - RRR where SSS is the sn and RRR is the rcode. Some devices may use a different nomenclature for their service request numbers. For this special case, the sn parameter indicates how the rcode value should be formatted. If sn = 0, then rcode is interpreted as decimal. If sn = -1, then rcode is interpreted as a 4-digit hexadecimal number. If sn = -2, then the object class DAVars is searched for an attribute of Error_code. This allows the displaying of eight-digit hex error codes. The diagnostic application is responsible for setting up a DAVars object similar to the following: DAVars: dname: <device name under test> vname: Error_code "Error_code is an ascii string" vtype: DIAG_STRING "Literal value" val: <8 digit hex character string> See the getdavar/putdavar subroutine for more information. |
rmsg | Message number of the text describing the reason code. The set number of the text is predefined by the PSet field in the Predefined Diagnostic Resources object class. |
timestamp | Specifies the time the FRU bucket was added. |
The Fru Reporting Object Class (FRUs) is used to store failing replaceable unit information. This information is specified by the Diagnostic Application and passed back to the Diagnostic Controller after an error has been detected.
All applications using the FRU capability must use the addfrub diagnostic library subroutine.
The FRUs object class structure is defined as:
class FRUs { char dname[16]; char fname[16]; char floc[16]; short ftype; short fmsg; short conf; };
Parmeter | Description |
---|---|
dname | Names the device under test. |
fname | Names the FRU.
The parameters floc and fmsg must be specified, if fname is not represented in the Customized Devices object class. Otherwise, they should be set to 0. |
floc | Location icode for fname. |
ftype | Indicates the type of FRU Bucket being added to the system. The following
values are defined:
|
fmsg | Message number of the text describing fname. The set number is predefined by the PSet descriptor in the Predefined Diagnostic Resources object class. |
conf | Indicates whether an FRU is valid. A value of 0 indicates an invalid
FRU. No other FRUs are displayed once an invalid FRU is found in the FRU
bucket.
However, if fname contains the string REF-CODE, then the fmsg and conf values are used to make the 8-digit ref code. For AIX 4.3.2 and earlier versions, this field indicates the probability of failure associated with the named FRU. |
The Diagnostic Application Variables Object Class (DAVars) is used to store run time information needed by the Diagnostic Application. This object class is used to store state variables to support Loop Testing.
All applications using the DAVars capability must use the getdavar/putdavar diagnostic library subroutine.
The DAVars object class structure is defined as:
class DAVars { char dname[16]; char vname[30]; short vtype; char vvalue[30]; long ivalue; };
Parmeter | Description |
---|---|
dname | Name of the device with which the variable is associated. |
vname | Name of the variable. |
vtype | Type of the variable. The following values are defined:
|
vvalue | Stores character string variable. |
ivalue | Stores integer or short value of variable. |
The Predefined Diagnostic Devices object class (PDiagDev) identifies the resources supported by AIX 4.1 diagnostics and provides additional information needed to test the resource. This object class is recognized by the operating system for backlevel compatibility purposes. For development purposes, use PDiagRes instead.
The PDiagDev object class structure is defined as:
class PDiagDev { char DType[16]; char DSClass[16]; short Ports; short PSet; short PreTest; char AttDType[16]; char AttSClass[16]; short Conc; short SupTests; short Menu; short DNext; vchar DaName[255]; char Diskette[5]; vchar EnclDaName[255]; short Sysxflg; char DClass[16]; };
The Diagnostic Supervisor Menu Options object class (DSMOptions) contains stanzas describing AIX 4.1 Diagnostic Service Aids. This object class is recognized by the operating system for backlevel compatibility purposes. For development purposes, use PDiagRes instead.
The DSMOptions object class structure is defined as:
class DSMOptions { char msgkey[4]; vchar catalogue[255]; short order; short setid; short msgid; vchar action[255]; char Diskette[5]; };
Parmeter | Description |
---|---|
msgkey | Key used by the Service Aid Utility Controller to identify this entry as a Service Aid. Must be set to "USM" for Service Aids. |
catalogue | Catalog name from which to extract the message for the Service Aid title and description. |
order | Order in which the messages should be appended to build the menu. The
following values are defined:
|
setid | Set number of the message. |
msgid | Message ID of the message. |
action | Command to start, if the user selects the specified option. |
Diskette | Indicates that the Service Aid is on a Supplemental Diskette, and what
actions to take before processing the Service Aid. The following values are
defined:
|