Diagnostics uses the AIX Screen Library (ASL) for the user interface. This is the same interface that System Management Interface Tool (SMIT) uses. All diagnostic programs should use the diag_asl_{} function calls described in Diagnostic Library section of this guide to implement this user interface.
In order for Diagnostics to run in a window, a minimum screen dimension of 24 lines by 80 columns is required.
Each screen that is displayed should follow the general layout shown below:
.Title Line . .menu# . .Title Line (if needed, or blank line) . ................................................................................ .information and command line 1 . .information and command line 2 . .information and command line 3 . . . . . . . . . . . . . .information, commands, and prompt lines . . . .prompt lines . . . . . . . . . . . . . . ................................................................................ .blank line . .Information Line 1 .Information Line 2 (if needed)
A command is defined as any action which the user is required to do. An example of a command is:
OPEN........the diskette door.
Commands are formatted as follows:
Information is defined as anything which is displayed to help the user. It includes selection options, general information, etc. An example of information is:
Please stand by.
Information starts in position 1 or 5 and is displayed as normal text.
Prompts are used to ask the user to do a keyboard action so that the system can continue. The key action may only require an indication that the user has completed an action. In other cases the user may be required to select an item. Here several key strokes may be required. A prompt is displayed to indicate that a selection is required to continue. See Suggested Generic Prompts for examples.
A blank line always precede the prompt lines. Blank lines can be included at any point within the commands and information.
If the text specified by the application does not fit on a single screen, the labels TOP/MORE/BOTTOM are displayed. The Up Arrow and Down Arrow keys can be used to scroll.
The following screen types put informational text on the screen, and then waits for the user to press a key to continue, or exit. The function keys supported by the screen type follows in parans ().
The following screen types put informational text on the screen and then exits without waiting for any user response. These support CANCEL, and EXIT only.
The following screen type is a dialog screen. This screen requires that the user be able to enter data information into selected fields. After data is entered, then a key is pressed to continue.
The following screen types put informational text on the screen and then waits for the user to make a selection. Only one selection item is permitted.
The following screen types put informational text on the screen and waits for the user to make one or more selections from a list.
The following screen type supports a popup message.
The list of function keys below show the currently supported keys.
Header file /usr/include/asl.h contains the data structures used to create ASL menus. The diagnostic header file /usr/include/diag/diago.h references the asl file, and should be included in every application program. The programmer should also be familiar with the ASL_SCR_TYPE and ASL_SCR_INFO structures. They both should be instantiated at the beginning of any function that builds menus:
ASL_SCR_INFO *menuinfo; ASL_SCR_TYPE menutype = DM_TYPE_DEFAULTS;
Normally the title is the first element in the array of text strings (struct ASL_SCR_INFO), and the instruction line is the last element. The elements in between are subject to scrolling.
The dialog and selection menus are built differently than the other menu types. Each text line or group of text lines are stored in a ASL_SCR_INFO structure. The first structure member, menuinfo[0], is normally where the title line and possibly following instructional lines are. The last structure member, menuinfo[n], contains the text that is placed just before the selection or dialogue list. All other structure members are treated as selections or dialog entries, and are also subject to scrolling.
All prompts should be generic in nature. This eases the transition of code from one interface to another, such as using a Web-based interface. The prompts below should be used where ever appropriate.
-------------------------------------------------------------------------------- TESTING 3.5 INCH DISKETTE DRIVE (fd0) 935045 Diskette Change/Write Protect Test REMOVE.........the diskette, if any, from the diskette drive (fd0). INSERT.........the High Capacity (2M byte) Diagnostic Test Diskette or an equivalent, formatted, scratch diskette into the diskette drive (fd0). NOTE: The diskette must be write protected (the write protect tab should not cover the hole). Use Enter to continue. F3=Cancel F10=Exit Enter --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- DIAGNOSTIC OPERATING INSTRUCTIONS VERSION 4.3.0 801001 LICENSED MATERIAL and LICENSED INTERNAL CODE - PROPERTY OF IBM (C) COPYRIGHTS BY IBM AND BY OTHERS 1982, 1997. ALL RIGHTS RESERVED. These programs contain diagnostics, service aids, and tasks for the system. These procedures should be used whenever problems with the system occur which have not been corrected by any software application procedures available. In general, the procedures will run automatically. However, sometimes you will be required to select options, inform the system when to continue, and do simple tasks. Several keys are used to control the procedures: - The Enter key continues the procedure or performs an action. - The Backspace key allows keying errors to be corrected. - The cursor keys are used to select an option. Press the F3 key to exit or press Enter to continue. --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- TESTING COMPLETE on Wed Jan 7 14:58:06 CST 1998 801010 No trouble was found. The resources tested were: - hdisk2 00-08-00-3,0 400 MB SCSI Disk Drive Use Enter to continue. F3=Cancel F10=Exit Enter --------------------------------------------------------------------------------
Note: This screen type will look and be treated exactly like the ASL_DIAG_KEYS_ENTER_SC.
-------------------------------------------------------------------------------- PRODUCT TOPOLOGY SERVICE AID 802604 REMOVE.........the diskette, if any, from the diskette drive. INSERT.........the Product Topology Update Diskette into the drive. If an EC, MES, or external device was installed, use the Update Diskette that was shipped with the EC, MES, or external device. Otherwise, use one of the Update Diskettes shipped with the system and stored in the Service Information Binder. When finished, use Enter to continue.. F1=Help F3=Cancel F10=Exit Enter --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- DISK MEDIA SERVICE AID 802584 Device: hdisk2 in location 00-08-00-3,0 The certify operation is in progress. Please stand by. 1% completed. Disk Drive Capacity................... 400 MB Data Errors Recovered................. 0 Data Errors Not Recovered............. 0 Equipment Check Errors Recovered...... 0 Equipment Check Errors Not Recovered.. 0 F3=Cancel F10=Exit --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- DISK MAINTENANCE SERVICE AID 802324 Disk to Disk Copy. The certify operaCopying hdisk1 to hdisk2. 20% Complete. Please stand by. --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- ALTER VPD 802033 mem0 00-0A 8 MB Memory Card Type or select the values in the entry field or fields. Items with data in brackets [] may be altered. EC Level.................... 00 Device Specific.(Z0)........ 00 Device Specific.(Z1)........ 00 Device Specific.(Z2)........ 00 User Data................... [] F1=Help F2=Refresh F3=Cancel F4=List F5=Reset F7=Commit F10=Exit --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- GENERIC MICROCODE DOWNLOAD SERVICE AID 802201 Make sure media is installed before selecting device. Move cursor to the device from which you wish to restore, then press Enter. fd0 00-00-0D-00 Diskette Drive rmt0 00-08-00-5,0 2.3 GB 8mm Tape Drive F3=Cancel F10=Exit --------------------------------------------------------------------------------
Note: F1=Help key added.
-------------------------------------------------------------------------------- FUNCTION SELECTION 801002 Move cursor to selection, then press Enter. Diagnostic Routines This selection will test the machine hardware. Wrap plugs and other advanced functions will not be used. Advanced Diagnostics Routines This selection will test the machine hardware. Wrap plugs and other advanced functions will be used. Task Selection(Diagnostics, Advanced Diagnostics, Service Aids, etc.) This selection will list the tasks supported by these procedures. Once a task is selected, a resource menu may be presented showing all resources supported by the task. Resource Selection This selection will list the resources in the system that are supported by these procedures. Once a resource is selected, a task menu will be presented showing all tasks that can be run on the resource(s). F1=Help F10=Exit F3=Previous Menu --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- TASKS SELECTION LIST 801004 From the list below, select a task by moving the cursor to the task and pressing 'Enter'. To list the resources for the task highlighted, press 'List'. [MORE...19] Periodic Diagnostics Backup and Restore Media Disk Maintenance Product Topology Add or Delete Drawer Configuration Create Customized Configuration Diskette Update Disk Based Diagnostics AIX Shell Prompt Generic Microcode Download Run Error Log Analysis Service Aids For Use With Ethernet SCSI Device Identification and Removal Service Aid [MORE...2] F1=Help F4=List F10=Exit Enter F3=Previous Menu --------------------------------------------------------------------------------
Note: F1=Help key added.
-------------------------------------------------------------------------------- RESOURCE SELECTION LIST 801006 From the list below, select any number of resources by moving the cursor to the resource and pressing 'Enter'. To cancel the selection, press 'Enter' again. To list the supported tasks for the resource highlighted, press 'List'. Once all selections have been made, press 'Commit'. To exit without selecting a resource, press the 'Exit' key. [TOP] All Resources This selection will select all the resources currently displayed. sysplanar0 00-00 CPU Planar proc0 00-00 Processor slc0 00-00 Serial Optical Link Chip mem0 00-0A 8 MB Memory Card mem1 00-0B 32 MB Memory Card mem2 00-0C 8 MB Memory Card [MORE...30] F1=Help F4=List F7=Commit F10=Exit F3=Previous Menu --------------------------------------------------------------------------------
Note: This is used by the diag_emsg and diag_asl_msg library function calls. These library functions should only be used by Tasks and Service Aids. The resultant screen is a popup similiar to:
-------------------------------------------------------------------------------- TASKS SELECTION LIST 801004 From the list below, select a task by moving the cursor to the task and pressing 'Enter'. To list the resources for the task highlighted, press 'List'. [MORE...15] Delete Res-------------------------------------------------------- SCSI BUS A| | Download M| | Display or| The task does not require resource selection, | Periodic D| OR, | Backup and| no resources were found to support the task. | Disk Maint| | Product To| | Add or Del| | Create Cus| | Update Dis| | AIX Shell | | [MORE...6] | | | | F1=Help | F3=Cancel F10=Exit Enter | F3=Previous -------------------------------------------------------- --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- TESTING SCSI DISK DRIVE hdisk2 IN LOCATION 00-08-00-3,0 954001 Please stand by. F3=Cancel F10=Exit --------------------------------------------------------------------------------
struct tm_input tm_input; char *text_array[3]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* fill in char array with menu info */ text_array[0] = get_dev_desc ( tm_input.dname ); text_array[1] = tm_input.dname; text_array[2] = tm_input.dnameloc; /* display the menu */ rc = diag_display_menu( CUSTOMER_TESTING_MENU, 0x954001, text_array, 0, 0 );
-------------------------------------------------------------------------------- TESTING SCSI DISK DRIVE hdisk2 IN LOCATION 00-08-00-3,0 954001 IN ADVANCED MODE Please stand by. F3=Cancel F10=Exit --------------------------------------------------------------------------------
struct tm_input tm_input; char *text_array[3]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* fill in char array with menu info */ text_array[0] = get_dev_desc ( tm_input.dname ); text_array[1] = tm_input.dname; text_array[2] = tm_input.dnameloc; /* display the menu */ rc = diag_display_menu( ADVANCED_TESTING_MENU, 0x954001, text_array, 0, 0 );
-------------------------------------------------------------------------------- TESTING SCSI DISK DRIVE hdisk2 IN LOCATION 00-08-00-3,0 954001 IN ADVANCED MODE Testing multiple times. 2 passes completed. 1 errors logged. To stop the test, use 'Cancel'. F3=Cancel F10=Exit --------------------------------------------------------------------------------
struct tm_input tm_input; char *text_array[3]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* fill in char array with menu info */ text_array[0] = get_dev_desc ( tm_input.dname ); text_array[1] = tm_input.dname; text_array[2] = tm_input.dnameloc; /* display the menu */ rc = diag_display_menu( LOOPMODE_TESTING_MENU, 0x954001, text_array, tminput.lcount, tm_input.lerrors );
-------------------------------------------------------------------------------- SERIAL DISK ADAPTER OPERATIONAL MICROCODE IS MISSING 870001 The Serial disk adapter operational microcode is either missing or not accessable. This microcode is necessary in order to use the Serial disk adapter in normal system operations. Use Enter to continue. F3=Cancel F10=Exit Enter --------------------------------------------------------------------------------
=========================================================== CATALOG FILE set SET1 MSG1 "SERIAL DISK ADAPTER MSG2 "Serial Disk adapter =========================================================== nl_catd fdes; struct tm_input tm_input; char *text_array[3]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* open the catalog file */ fdes = diag_catopen(CATALOG_FILE_NAME, 0); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* fill in char array with menu info */ text_array[0] = diag_cat_gets ( fdes, SET1, MSG1 ); text_array[1] = diag_cat_gets ( fdes, SET1, MSG2 ); text_array[2] = diag_cat_gets ( fdes, SET1, MSG2 ); /* display the menu */ rc = diag_display_menu( NO_MICROCODE_MENU, 0x870001, text_array, 0, 0 );
-------------------------------------------------------------------------------- SERIAL DISK ADAPTER DIAGNOSTIC MICROCODE IS MISSING 870001 The Serial disk adapter diagnostic microcode is either missing or not accessable. This microcode is necessary in order to run diagnostics on the Serial disk adapter Use Enter to continue. F3=Cancel F10=Exit Enter --------------------------------------------------------------------------------
=========================================================== CATALOG FILE set SET1 MSG1 "SERIAL DISK ADAPTER MSG2 "Serial Disk adapter =========================================================== nl_catd fdes; struct tm_input tm_input; char *text_array[3]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* open the catalog file */ fdes = diag_catopen(CATALOG_FILE_NAME, 0); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* fill in char array with menu info */ text_array[0] = diag_cat_gets ( fdes, SET1, MSG1 ); text_array[1] = diag_cat_gets ( fdes, SET1, MSG2 ); text_array[2] = diag_cat_gets ( fdes, SET1, MSG2 ); /* display the menu */ rc = diag_display_menu( NO_DIAGMICROCODE_MENU, 0x870001, text_array, 0, 0 );
-------------------------------------------------------------------------------- SERIAL DISK ADAPTER DEVICE DRIVER IS MISSING 870001 The Serial disk adapter device driver is either missing or not accessable. This device driver is necessary in order to use the Serial disk adapter in normal system operations. Use Enter to continue. F3=Cancel F10=Exit Enter --------------------------------------------------------------------------------
=========================================================== CATALOG FILE set SET1 MSG1 "SERIAL DISK ADAPTER MSG2 "Serial Disk adapter =========================================================== nl_catd fdes; struct tm_input tm_input; char *text_array[3]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* open the catalog file */ fdes = diag_catopen(CATALOG_FILE_NAME, 0); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* fill in char array with menu info */ text_array[0] = diag_cat_gets ( fdes, SET1, MSG1 ); text_array[1] = diag_cat_gets ( fdes, SET1, MSG2 ); text_array[2] = diag_cat_gets ( fdes, SET1, MSG2 ); /* display the menu */ rc = diag_display_menu( NO_DDFILE_MENU, 0x870001, text_array, 0, 0 );
-------------------------------------------------------------------------------- TESTING SCSI DISK DRIVE hdisk0 IN LOCATION 00-08-00-3,0 891001 A number of attributes are found to be missing from the Data Base. Unexpected results may occur due to this problem. F3=Cancel F10=Exit --------------------------------------------------------------------------------
=========================================================== CATALOG FILE set DHF_SET1 MISSING_ATTRIBUTES "%1$6X \ TESTING SCSI DISK DRIVE %2$s IN LOCATION %3$s\n\n\n\ A number of attributes are found to be missing from the Data Base.\n\ Unexpected results may occur due to this problem." $ $ This menu goal is used when ODM attributes cannot be $ obtained. =========================================================== nl_catd fdes; struct tm_input tm_input; long menu_nmbr; char msgstr[1024]; /* initialize locale and ASL */ set_locale ( LC_ALL, 0 ); diag_asl_init("DEFAULT"); /* open the catalog file */ fdes = diag_catopen(CATALOG_FILE_NAME, 0); /* initialize the ODM */ init_dgodm(); /* get the DA input */ getdainput( &tm_input ); /* The menu number MUST be the first item in the character buffer. The menu goal title follows the menu number with a single space between. Everything after the first carriage return is considered menu text. */ menu_nmbr = 0x891001; sprintf( msgstr, (char *) diag_cat_gets(fdes, DHF_SET1, MISSING_ATTRIBUTES), menu_nmbr, tm_input.dname, tm_input.dnameloc); menugoal(msgstr);