lshost

Use the lshost command to generate a list with concise information about all the hosts visible to the clustered system (system) and detailed information about a single host.

Syntax

 lshost   [  -filtervalue  attribute=value  ]   [  -nohdr  ]   [  -delim  delimiter  ]     [  -filtervalue?  ] [ {  object_id  |  object_name  } ]

Parameters

-filtervalueattribute=value
(Optional) Specifies a list of one or more filters. Only objects with a value that matches the filter attribute value are returned. If a capacity is specified, the units must also be included.
Note: Some filters allow the use of a wildcard when you enter the command. The following rules apply to the use of wildcards with the Storwize V5000 command-line interface (CLI):
  • The wildcard character is an asterisk (*).
  • The command can contain a maximum of one wildcard.
  • When you use a wildcard character, you must enclose the filter entry within double quotation marks ("" ), as follows: lshost -filtervalue "name=md*"
-nohdr
(Optional) By default, headings are displayed for each column of data in a concise style view, and for each item of data in a detailed style view. The -nohdr parameter suppresses the display of these headings.
Note: If no data exists to be displayed, headings are not displayed.
-delimdelimiter
(Optional) By default in a concise view, all columns of data are space-separated. The width of each column is set to the maximum width of each item of data. In a detailed view, each item of data has its own row, and if the headers are displayed the data is separated from the header by a space. The -delim parameter overrides this behavior. Valid input for the -delim parameter is a 1-byte character. If you enter -delim : on the command line, the colon character (:) separates all items of data in a concise view; for example, the spacing of columns does not occur. In a detailed view, the data is separated from its header by the specified delimiter.
object_id | object_name
(Optional) Specifies the name or ID of an object. When you use this parameter, the detailed view of the specific object is returned and any value that is specified by the -filtervalue parameter is ignored. If you do not specify the object_id | object_name parameter, the concise view of all objects that match the filtering requirements that are specified by the -filtervalue parameter are displayed.
-filtervalue?
(Optional) Specifies that you want your report to display any or all of the list of valid filter attributes. The valid filter attributes for the lshost command are:
  • host_cluster_id
  • host_cluster_name
  • host_name
  • host_id
  • id
  • iogrp_count
  • name
  • port_count
  • site_id
  • site_name
  • status
  • type

For more information about filtering attributes, see Attributes of the -filtervalue parameters.

Description

This command returns a concise list or a detailed view of hosts visible to the system.

For Fibre Channel (FC) ports, the node_logged_in_count field provides the number of nodes that the host port is logged in to. For Internet Small Computer System Interface (iSCSI) ports, the node_logged_in_count field provides the number of iSCSI sessions from the host iSCSI qualified name (IQN).

You can map an iSCSI host to volumes that are accessible through multiple I/O groups. iSCSI hosts can access volumes that are accessible through multiple I/O groups (and single I/O groups). An iSCSI host that is mapped to a volume accessible through multiple I/O groups is online if it has at least one active iSCSI session with each I/O group of the access set. If volumes are not mapped to an iSCSI host, it is degraded.

The following list provides the different states for a fabric attach FC host port:
active
The host port is active if all nodes with volume mappings have a login for the specified worldwide port name (WWPN) and at least one node received SCSI commands from the WWPN within the last 5 minutes.
degraded
The host port is degraded if one or more nodes with volume mappings do not have a login for the specified WWPN.
inactive
The host port is inactive if all the nodes with volume mappings have a login for the specified WWPN but no nodes see any Small Computer System Interface (SCSI) commands from the WWPN within the last 5 minutes.
offline
The host port is offline if one or more input/output (I/O) groups with volume mappings do not have a login for the specified WWPN.
The following list provides the different states for a direct attach FC host port:
active
The host port is active if a node has a login for the specified WWPN and the node receives SCSI commands from the WWPN within the last 5 minutes.
inactive
The host port is inactive if all the nodes with volume mappings have a login for the specified WWPN but no nodes see any Small Computer System Interface (SCSI) commands from the WWPN within the last 5 minutes.
offline
The host port is offline if no login exists for the specified WWPN.
If a host does not have any volume mappings, it is reported as offline or inactive.
Note: The lshost command presents a list of host HBA ports that are logged in to nodes. However, situations exist when the information presented can include host HBA ports that are no longer logged in or even part of the SAN fabric. For example, a host HBA port is unplugged from a switch, but lshost still shows the WWPN logged in to all nodes. If this action occurs, the incorrect entry is removed when another device is plugged in to the same switch port that previously contained the removed host HBA port.
The following list provides the different states for a specified iscsiname:
active
The iscsiname is active if all I/O groups with volume mappings have at least one associated iSCSI session for the specified iscsiname.
inactive
The iscsiname is inactive if the host has no volume mappings but at least one iSCSI session for the specified iscsiname is present.
offline
The iscsiname is offline if one or more I/O groups with volume mappings do not have an associated iSCSI session for the specified iscsiname.
The following list provides the different states for host_status:
online
The host has full connectivity. A host that uses just one style of connectivity is online if it uses one of these types:
Fibre Attach Fibre Channel (FAFC)
Every port is active or inactive, and is logged in to every online node in each I/O group in which the host has volume mappings.
Direct Attach Fibre Channel (DAFC)
The host has an active or inactive login to every node in I/O groups to which the host has volume mappings.
Internet Small Computer System Interface (iSCSI)
The host has an iSCSI session with each I/O group with which the host has volume mappings.
offline
The host has no connectivity. The reason might be because the host is powered off and is not on.
Remember: If an iSCSI host is only logged in to I/O groups for which it is not configured, the associated host object status is offline.
degraded
The host is not fully connected, which might be introduced by a configuration error or a hardware failure. It can cause a loss of access during any planned maintenance activity and must be corrected as soon as possible.
Remember: An iSCSI host that has no mapped volumes is degraded if it is logged in to some, but not all, of the I/O groups to which it belongs.
mask
The Fibre Channel (FC) I/O ports (which exist on a node) hosts can access.
lshost output shows the possible outputs:
Table 1. lshost output
Attribute Description
id Indicates the unique host ID. The value is an alphanumeric value.
name Indicates the unique host name. The value is an alphanumeric string.
port_count Indicates the number of ports.
type Indicates the host type.
mask Indicates the mask value with a 64-bit binary string.
iogrp_count Indicates the number of I/O groups.
status Indicates whether the host is online or offline.
WWPN Indicates the worldwide port name (WWPN) with a 16-character hexadecimal string.
SAS_WWPN Indicates the serial-attached SCSI (SAS) WWPN with a 16-character hexadecimal string.
node_logged_in_count Indicates the number of nodes the WWPN is logged in to.
state Indicates the state of the SAS WWPN login. The values are:
  • offline
  • inactive
  • active
sas_wwpn_count Indicates the number of configured SAS WWPNs.
site_id Identifies the site ID for the host. The values are 1, 2, or blank.
site_name Identifies the site name for the host. The value must be an alphanumeric string or blank.
host_cluster_id Indicates the unique ID for a host cluster.
host_cluster_name Indicates the unique name for a host cluster.

An invocation example

lshost

The resulting output:

id name    port_count iogrp_count status mapping_count host_cluster_id  host_cluster_name site_id site_name  
  0  hostone 1          4           offline              0               vardyhost1 2 chelsea3
  1  host0   1          4           degraded             1               vardyhost2 1 chelsea1
  2  host1   1          4           online               2               vardyhost3 2 chelsea2

A detailed invocation example

lshost 0

The resulting output:

id 0
name ined
port_count 1
type openvms
mask 0000000000000000000000000000000000000000000000000000000000001101
iogrp_count 4
status online
WWPN 10000000C92BB490
node_logged_in_count 1
state inactive
site_id 2
site_name chelsea2
host_cluster_id 1
host_cluster_name jvardy8

An invocation example

lshost 0

The resulting output:

id 0
name host0
port_count 10
type generic
mask 1111111111111111111111111111111111111111111111111111111111111111
iogrp_count 4
status offline
SAS_WWPN 1000000000000009
node_logged_in_count 0
state offline
SAS_WWPN 1000000000000008
node_logged_in_count 0
state offline
site_id 2
site_name chelsea2
host_cluster_id 2
host_cluster_name boat3ng