lsnports command

Purpose

Lists available ports that are capable of N_Port ID Virtualization (NPIV) and related information.

Syntax

lsnports [-fmt Delimiter] [-field Fieldname]

Description

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.

Flags

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:
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

Output Field Definitions

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

Exit Status

Return code Description
62 System does not have ports capable of NPIV.

Examples

  1. To list all the NPIV-capable ports, type the following command:
    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
  2. To list all the NPIV-capable ports in script format separated by two colons (::), type the following command:
    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
  3. To list specific fields (name, swwpns, and awwpns) of all the NPIV-capable ports, type the following command:
    lsnports -field name swwpns awwpns

    The system displays the following message:

    name    swwpns  awwpns
    fcs0    2048    2047



Last updated: Wed, November 18, 2020