Lists available ports that are capable of N_Port ID Virtualization (NPIV) and related information.
The lsnports command displays information for all the ports capable of NPIV. If you use the name of the adapter driver (for a particular physical port) in the vfcmap command, the map_port attribute is set for a virtual fibre channel adapter on the server logical partition. This attribute maps the virtual fibre channel adapter on the server logical partition to a physical fibre channel port.
Without a flag, information is displayed in a column. Specifying the -fmt flag formats the output with a specified delimiter. If no NPIV ports are in the Virtual I/O Server logical partition, the error code E_NO_NPIV_PORTS(62) is displayed.
| Flag name | Description |
|---|---|
| -fmt delimiter | Specifies a delimiter character to separate output fields. |
| -field | Specifies a list of fields to be displayed.
The following fields are supported:
|
| Field | Description |
|---|---|
| name | Physical port name |
| physloc | Physical port location code |
| fabric | Fabric support |
| tports | Total number of NPIV ports |
| aports | Number of available NPIV ports |
| swwpns | Total number of target worldwide port names supported |
| awwpns | Number of target worldwide port names available |
| Return code | Description |
|---|---|
| 62 | System does not have ports capable of NPIV. |
lsnports
The system displays the following message:
Name physloc fabric tports aports swwpns awwpns
fcs0 U789D.001.DQDMLWV-P1-C1-T1 1 64 64 2048 2047
fcs1 U787A.001.DPM0WVZ-P1-C1-T2 1 63 62 504 496
lsnports -fmt "::"
The system displays the following message:
fcs0::U789D.001.DQDMLWV-P1-C1-T1::1::64::64::2048::2047
fcs1::U787A.001.DPM0WVZ-P1-C1-T2::1::63::62::504::496
lsnports -field name swwpns awwpns
The system displays the following message:
name swwpns awwpns
fcs0 2048 2047