diag Command

Purpose

Performs hardware problem determination.

Syntax

diag [ [ -a ] | [ -s [ -c ] ] [ -E days] [ -e] | [ -d Device [ -c ] [ -v ] [ -e ] [ -A ] ] | [ -B [ -c ] ] | [ -T taskname] | [ -S testsuite] | [ -c -d Device -L pending | complete ]

Description

The diag command is the starting point to run a wide choice of tasks and service aids. Most of the tasks and service aids are platform-specific. The following tasks and service aids are available:

  • Run diagnostics
  • Display or change diagnostic run time options
  • Display Service Hints
  • Display previous diagnostic results
  • Display hardware error report
  • Display software product data
  • Display configuration and resource list
  • Display hardware vital product data
  • Display resource attributes
  • Change hardware vital product data
  • Format media
  • Certify media
  • Display test patterns
  • Local area network analyzer
  • Add resource to resource list
  • Delete resource from resource list
  • SCSI bus analyzer
  • Download microcode
  • Display or change bootlist
  • Periodic diagnostics
  • Backup and restore media
  • Disk maintenance
  • Configure dials and LPFkeys
  • Add or delete drawer Config
  • Create customized configuration diskette
  • Update disk based diagnostics
  • Configure ISA adapter
  • Operating system shell prompt (online service mode only)
  • Display or change multiprocessor configuration
    • Enable and disable individual processors
  • Display or change BUMP configuration
    • Update the flash EPROM with a new binary image
    • Display or change diagnostic modes
    • Display or change remote phone numbers and modem configurations
  • Display or change electronic mode switch
  • Process supplemental media (stand-alone mode only)
  • Generic microcode download
  • Run error log analysis
  • Service aids for use with Ethernet
  • 7135 RAIDiant array service aids
  • SCSI device identification and removal
  • SCSD tape drive service aid
  • Escon bit error rate service aid
  • PCI RAID physical disk identify
  • Configure ring indicate Power On Policy (CHRP)
  • Configure surveillance policy (CHRP)
  • Configure reboot policy (CHRP)
  • Configure remote maintenance policy (CHRP)
  • Save or restore hardware management policies (CHRP)
  • Display firmware device node information (CHRP)
  • Spare sector availability
  • Update system or service processor flash (CHRP)
  • Display system environmental sensors (CHRP)
  • Display checkstop analysis results
  • Analyze adapter internal log
  • Log repair action
  • Flash SK-NET FDDI firmware
  • Display microcode level

You can use the System Management Interface Tool (SMIT) smit diag fast path to run this command.

Flags

Note: Most users do not need to use any flags since the diag command is a menu driven program.
Item Description
-A Specifies advanced mode. You must also specify a device by using the -d flag.
-a Processes any changes in the hardware configuration by asking if missing resources are removed, turned off, and so on. Missing resources (indicated by an 'M') and missing resource paths (indicated by a 'P') are integrated into the diagnostic resource selection list.
-B Instructs diagnostic tests to run the base system test. Error log analysis is also done on areas in the base system that supports error log analysis.
-c Indicates that the machine is not attended. No questions are asked. Results are written to standard output. You must also use an optional flag that specifies a device to be tested (d, B, or s).
-d Device Specifies the device to run the diagnostic tests on.
-E Days Specifies the number of days to be used for searching the error log during run error log analysis. This flag works with any other flag.
-e Performs error log analysis if supported on the selected device. No tests are performed. This flag must be used with the -d flag, otherwise the resource selection menu appears. If used with the -v flag, the -v flag takes precedence and the -e flag is ignored.
-S testsuite Indicates a particular test suite of devices to test:
  1. Base system
  2. I/O devices
  3. Async devices
  4. Graphic devices
  5. SCSI devices
  6. Storage devices
  7. Common devices
  8. Multimedia devices
-L pending | complete Logs repair action for a resource that is specified with the -d and -c options. Use the pending parameter if the part is replaced, but it is not yet known whether this part remains in the system. Use the complete parameter if the part is replaced and it is known that this part remains in the system.
-s Runs the diagnostic tests on all resources.
-T taskname Specifies the specific Fastpath task to be run. The following list displays the current fastpath tasks :
format
Format media task
certify
Certify media task
download
Download microcode task
disp_mcode
Display microcode level task
chkspares
Spare sector availability task
identifyRemove
Hot plug task
Note: Tasks are platform and device dependent. Some tasks might not be available on the system.
-v Runs the diagnostic tests in the system verification mode, no error log analysis performed. The default is Problem Determination mode that tests the device and runs error log analysis. If used with the -e flag, the -v flag takes precedence and the -e flag is ignored. Must be used with the -d flag to specify a device to run the diagnostic tests on.

Security

Access Control: Only the root user can run this command.

Privilege Control: System group.

Examples

To run the diagnostic tests on the scdisk0 device, without questions, enter:

diag -d scdisk0 -c

File

Item Description
/usr/sbin/diag Contains the diag command.