lsmpio Command
Purpose
Display information about the MultiPath I/O (MPIO) storage devices.
Syntax
lsmpio [ -l device_name ]
lsmpio -S [ -l device_name ] [ -d ]
lsmpio -a [ -r ] [ -e ] [ -z ]
lsmpio -h
Description
The lsmpio command displays information that is related to AIX® MPIO storage devices. This command works only for devices that are controlled by path-control modules (PCMs) that are enabled for lsmpio support.
- Path operational status
- Path statistics
- Device inquiry data
- Parent adapter information
The lsmpio command can also be used to reset the path statistics to zero.
Displaying path operational status
lspath -F "path_id status parent connection"
If
the -l flag is not included, the status
is shown for all MPIO paths in the system. If the -l flag
and device name are included, the status is shown only for those paths
that are used to attach the specified device.The -e flag displays error count information for the local adapter ports and remote ports. These error counts indicate an issue with the physical connectivity between the local adapter and the remote storage port. The error counts indicate recent errors for different time ranges.
The Path Status column shows the same status as the lspath command. The valid values of status are Enabled, Disabled, Failed, or Missing.
- Opt
- Indicates that the path is an optimized path. This value indicates a path that attaches to a preferred controller in a device that has multiple controllers. The PCM selects one of the preferred paths for I/O operations, whenever possible.
- Non
- Indicates that the path is a non-optimized path. On a device with preferred paths, this path is not considered as preferred path. The PCM avoids the selection of this path for I/O operations, unless all preferred paths fail.
- Act
- Indicates that the path is an active path on a device that has active and passive controllers. The PCM selects active paths for I/O operations on such a device.
- Pas
- Indicates that the path is a passive path on a device that has active and passive controllers. The PCM avoids the selection of passive paths.
- Sel
- Indicates that the path is being selected for I/O operations, for the time when the lsmpio command is to be run.
- Rsv
- Indicates that the path has experienced an unexpected reservation conflict. This value might indicate a usage or configuration error, with multiple hosts accessing the same disk.
- Fai
- Indicates that the path experienced a failure. It is possible for a path to have a Path Status value of Enabled and still have an Extended Status value of Fai. This scenario indicates that operations sent on this path are failing, but AIX MPIO has not marked the path as Failed. In some cases, AIX MPIO leaves one path to the device in Enabled state, even when all paths are experiencing errors.
- Deg
- Indicates that the path is in a degraded state. This scenario indicates that the path was being used for I/O operations. Those operations experienced errors, thus causing the PCM to temporarily avoid the use of the path. Any additional errors might cause the path to fail.
- Clo
- Indicates that the path is closed. If all paths to a device are closed, the device is considered to be closed. If only some paths are closed, then those paths might have experienced errors during the last time the device was opened. The AIX MPIO periodically attempts to recover closed paths, until the device path is open.
Displaying path statistics
The -S flag, along with the optional -d flag, causes the lsmpio command to display normal or detailed path statistics. The optional -l flag allows the user to restrict the display to contain statistics for just one MPIO storage device. The statistics include how many times the path has been selected for an I/O operation, how many errors have occurred on the path, and how many times the path has failed. The detailed statistics information breaks down the failure counts, into counts of different types of failures.
Displaying device inquiry data
The -q flag of the lsmpio command causes the AIX MPIO to query the device, by using Small Computer System Interface (SCSI) commands to retrieve and display information about the attached device. Because each queried device is opened and queried by using SCSI commands, this operation might take time to run when there are many devices.
Displaying parent adapter information
The -a flag, along with the optional -r flag, causes the lsmpio command to display information about the Fibre Channel adapters that are used by the AIX MPIO storage devices. The information includes the details about the local adapter identifier, such as the worldwide name for Fibre Channel adapters and the current state of the link, if available. The -r flag adds information about the remote ports, which are accessed by the adapter.
Resetting statistics
The -z flag causes the lsmpio command to reset all statistics to zero. By default, the statistics for all devices are reset. The -l flag can be used to reset the statistics for only a single device.
Flags
Item | Description |
---|---|
-a | Lists parent Fibre channel adapter information. |
-d | Displays detailed statistics. This flag is only valid with the -S flag. |
-e | When this flag is used with the -a flag, error counts for the adapters are displayed. When this flag is used with the -a and -r flags, error counts for adapters and remote ports are displayed. |
-h | Displays command usage information. |
-l disk_name | Specifies a device. If this flag is included, the command operates on a single device. If this flag is omitted, the command operates on all AIX MPIO devices. This flag can be used by itself for the summary path status, or with the -q, -S, or -z flags. |
-q | Queries the device information. This command uses standard SCSI commands to query the device for information. The precise information returned varies, depending on the device type. |
-r | Displays the remote port information. This flag is used along with the -a flag to display information about the remote ports that are accessed by an adapter. The information that is returned might depend on the protocol that is used by the adapter. |
-S | Displays statistics for one or all devices. This flag displays basic counters for path use and path errors. If the -d flag is used along with this flag, it displays more detailed statistics. |
-z | Resets all statistics. If this flag is used, it causes the PCM to reset all statistical
counters back to zero. Note: You can use the -z flag with the
-a flag to reset the adapter error counts.
|
Security
Examples
Examples of displaying MPIO information:
- To display the summary information for the hdisk1234 device, enter
the following command:
The system displays an output similar to the following output:lsmpio -l hdisk1234
name path_id status path_status parent connection =============================================================================== hdisk1234 0 Enabled Opt,Sel,Deg,Rsv fscsi0 500a098186a7d4ca,0008000000000000 hdisk1234 1 Enabled Non fscsi0 500a098196a7d4ca,0008000000000000 hdisk1234 2 Enabled Opt,Sel fscsi1 500a098186a7d4ca,0008000000000000 hdisk1234 3 Enabled Non fscsi1 500a098196a7d4ca,0008000000000000
- To display detailed device statistics for the hdisk10 device,
enter the following command:
The system displays an output similar to the following output:lsmpio -Sdl hdisk10
Disk: hdisk10 Path statistics since Tue May 21 17:38:43 CDT 2013 Path 0: (fscsi0:500a098186a7d4ca,8000000000000) Path Selections: 0 Adapter Errors: 0 Software: 0 Hardware: 0 Transport Dead: 0 Transport Busy: 0 Transport Fault: 0 No Device Response: 0 Target Port ID Changed: 0 Command Timeouts: 0 Reservation Conflicts: 0 SCSI Queue Full: 0 SCSI Busy: 0 SCSI ACA Active: 0 SCSI Task Aborted: 0 SCSI Aborted Command: 0 SCSI Check Condition: 0 Medium Error: 0 Hardware Error: 0 Not Ready: 0 Other: 0 Last Error: N/A Last Error Time: N/A Path Failure Count: 0 Due to Adapter Error: 0 Due to I/O Error: 0 Due to Health Check: 0 Due to SCSI Sense: 0 Due to Qualifier Bit: 0 Due to Opening Error: 0 Last Path Failure: N/A Last Path Failure Time: N/A
Note: If some SCSI error counts are reported, it does not indicate a problem or that I/O operations have failed. It is normal during regular processing for temporary, recoverable errors to be reported, and for the I/O operation to be attempted again. - To display MPIO adapter information with remote port information,
enter the following command:
The system displays an output similar to the following output:lsmpio -ar
Adapter Driver: fscsi0 - AIX PCM Adapter WWPN: 10000000c94c7bd6 Link State: Up Paths Paths Paths Paths Remote Ports Enabled Disabled Failed Missing ID 500a098186a7d4ca 31 0 0 0 0x20a00 500a098196a7d4ca 31 0 0 0 0x20b00 500507630a18016b 19 0 0 0 0x31200 500507630a18416b 19 0 0 0 0x31300 500507630a18816b 19 0 0 0 0x31400 500507630a18c16b 19 0 0 0 0x31500 Adapter Driver: fscsi1 - AIX PCM Adapter WWPN: 10000000c94c7bd7 Link State: Up Paths Paths Paths Paths Remote Ports Enabled Disabled Failed Missing ID 500a098186a7d4ca 31 0 0 0 0x20a00 500a098196a7d4ca 31 0 0 0 0x20b00 500507630a18016b 19 0 0 0 0x31200 500507630a18416b 19 0 0 0 0x31300 500507630a18816b 19 0 0 0 0x31400 500507630a18c16b 19 0 0 0 0x31500 5001738000330150 1 0 0 0 0x10100 5001738000330162 1 0 0 0 0x10200
- To query a device and display information about it, enter the
following command:
The system displays an output similar to the following output:lsmpio -ql hdisk48
Device: hdisk48 Vendor Id: IBM Product Id: 2107900 Revision: .160 Capacity: 10G Volume Serial: 600507630AFFC16B0000000000001505 (Page 83 NAA)
Note: The information that is displayed comes from the standard inquiry data and the device identification VPD data. If the device represents a PPRC pair (the san_rep_device attribute has a value of yes), the display includes the volume serial number for each LUN in the pair, as well as the vendor-specific ID that is shared by the two LUNS of the pair, as shown here:Device: hdisk33 Vendor Id: IBM Product Id: 2107900 Revision: .160 Capacity: 10G Volume Serial: 600507630AFFC16B0000000000000113 (Page 83 NAA) Volume Serial: 600507630AFFC16B000000000000031F (Page 83 NAA) Vendor LUN Id: 3735544C37373130313133005022AD6A
- To display local and remote port error counts, enter the following
command:
The output might be similar to the following sample:lsmpio -are
Adapter Driver: fscsi3 -> AIX PCM Adapter WWPN: 21000024ff6aee7d Link State: Up Connectivity Errors: Last 10 Minutes: 74 Last 60 Minutes: 222 Last 24 Hours: 12345 Connectivity Errors Last 10 Last 60 Last 24 Remote Ports Minutes Minutes Hours 5001738000330171 0 0 0 5001738000330173 0 0 0 500a098286a7d4ca 2 9 45 500a098196a7d4ca 72 213 12300