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 runtime 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 a 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 information about firmware device node (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
  • Run the Non-Volatile Memory Express (NVMe) sanitize command on the NVMe-compliant devices that support the sanitize operation. The NVMe sanitize operation changes the Non-Volatile Memory (NVM) subsystem such that you cannot recover the previous user data from any cache or nonvolatile media. The sanitize operation for SED enabled drives returns the SED enabled drive to original factory settings.

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.
Table 1. Flags
Item Description
-A Specifies advanced mode. 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. 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
nvme_sanitize
Sanitize NVMe-compliant devices that support the sanitize operation. When you specify the nvme_sanitize task, you must also specify the force option by using the -f flag. The -f flag is only required when the -c flag is specified with the diag command, otherwise the diag command fails with an error. The nvme_sanitize task is not supported in no-console (command line) mode for SED enabled drives.
start of changeupdateend of change
start of changeValidates and updates the system firmware on a system without a Hardware Management Console (non-HMC). Only the root and ragent users can run this option of the -T flag. This option is supported only in the console mode.end of change
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 is 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

start of changeAccess Controlend of change
start of changeThe root user can run the diag command. The ragent user can run only the -T update option of the diag command.end of change
Privilege Control
Only the root user and members of the system group can run the diag command.

Examples

  1. To run the diagnostic tests on the scdisk0 device, without any questions, enter the following command:

    diag -d scdisk0 -c
  2. To run the NVMe sanitize operation on the NVMe device (nvmeX), enter the following command:

    diag -c -d nvmeX -T "nvme_sanitize -f"

File

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