Use the svcinfo lshostiplogin command to list the login session type and other details for hosts that are identified by their iSCSI Qualified Name (IQN) and logged in to Ethernet ports that are configured with IP addresses.
For more information about filtering attributes, see Attributes of the -filtervalue parameters.
This command lists the login session type and other details.
Attribute | Description |
---|---|
id | Object identifier that indicates a configured host IQN for which login details are displayed. |
name | Unique IQN for an iSCSI or iSER host. This IQN must belong to a configured host object. |
host_id | Host object ID to which this IQN belongs. |
host_name | Host name corresponding to host_id. |
login_count | Total number of login sessions that are established by the host to cluster ports to all I/O groups. |
login_protocol | Specifies the connection protocol that is used by the configured host
to establish sessions with Ethernet ports configured with IP addresses. This value can be
one of the following values:
|
login | An integer that refers to a single session from the host to any node in the cluster. This value is a number in the range of 0 - 31. |
node_id | Node ID of the node to which a login session, referred by login field, is established by host IQN. This value is an integer in the range of 1 - 32. |
node_name | Node name of the node to which a login session, referred by login field, is established by host IQN. This value is a string with a maximum of 16 characters. |
port_id | Port identifier that indicates the Ethernet port that is displayed by the lsportip view to which login is established. This value is a number in the range of 1 - 12. |
host_port_grp_id | Target port group identifier to which port, for login being described, belongs to. This value is a number in the range of 1 - 64. |
protocol | Indicates the connection protocol that is used by the configured IP
host IQN to establish a login session referred by the
login field. This value can be one of the following values:
|
ip_version | Indicates the IP addressing version. The value that is displayed is either IPv4 or IPv6. |
failover | Identifies whether the session refers to the local or failover IP address. The value that is displayed is either yes or no. |
* IQN "iqn.1996-04.de.suse:01:d4aba8f69a95" logged onto node1 (node_id 1) port 2 and 3 and node2 (node_id 2) port 2 and 3, with IPv4 version over iSCSI connection. lshostiplogin displays login sessions as shown below. Host Info: # svctask mkhost -iscsiname "iqn.1996-04.de.suse:01:d4aba8f69a95" Host, id [0], successfully created # lshost id name port_count iogrp_count status site_id site_name host_cluster_id host_cluster_name 0 host0 1 4 online Concise View # lshostiplogin id name host_id host_name login_count login_protocol 0 iqn.1996-04.de.suse:01:d4aba8f69a95 0 host0 4 iscsi Json View # lshostiplogin -json [{ "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "4", "login_protocol": "iscsi" }] Detailed View # lshostiplogin 0 id 0 name iqn.1996-04.de.suse:01:d4aba8f69a95 host_id 0 host_name host0 login_count 4 login_protocol iscsi login 0 node_id 1 node_name node1 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 1 node_id 1 node_name node1 port_id 3 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 2 node_id 2 node_name node2 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 3 node_id 2 node_name node2 port_id 3 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no Json View # lshostiplogin -json 0 { "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "4", "login_protocol": "iscsi", "logins": [{ "login": "0", "node_id": "1", "node_name": "node1", "port_id": "2", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no" }, {"login": "1", "node_id": "1", "node_name": "node1", "port_id": "3", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"}, { "login": "2", "node_id": "2", "node_name": "node2", "port_id": "2", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no" }, {"login": "3", "node_id": "2", "node_name": "node2", "port_id": "3", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"} ] } NOTE: This CLI does not display sorted list of logins. Order in which login requests are served to host IQN, will dictate order of logins displayed. Another possible Detailed view after few logouts and logins Detailed View # lshostiplogin 0 id 0 name iqn.1996-04.de.suse:01:d4aba8f69a95 host_id 0 host_name host0 login_count 4 login_protocol iscsi login 1 node_id 1 node_name node1 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 0 node_id 1 node_name node1 port_id 3 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 2 node_id 2 node_name node2 port_id 3 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 3 node_id 2 node_name node2 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no Json View # lshostiplogin -json 0 { "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "4", "login_protocol": "iscsi", "logins": [{ "login": "1", "node_id": "1", "node_name": "node1", "port_id": "2", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"}, {"login": "0", "node_id": "1", "node_name": "node1", "port_id": "3", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"}, { "login": "2", "node_id": "2", "node_name": "node2", "port_id": "3", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"}, {"login": "3", "node_id": "2", "node_name": "node2", "port_id": "2", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"} ] }
* This example covers failover scenario for Example 1, when node 2 is down and all logins are established on node1 port 2 and 3: Concise View # lshostiplogin id name host_id host_name login_count login_protocol 0 iqn.1996-04.de.suse:01:d4aba8f69a95 0 host0 4 iscsi Json View # lshostiplogin -json [{ "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "4", "login_protocol": "iscsi" }] Detailed View # lshostiplogin 0 id 0 name iqn.1996-04.de.suse:01:d4aba8f69a95 host_id 0 host_name host0 login_count 4 login_protocol iscsi login 0 node_id 1 node_name node1 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 1 node_id 1 node_name node1 port_id 3 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 2 node_id 1 node_name node1 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover yes login 3 node_id 1 node_name node1 port_id 3 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover yes Json View # lshostiplogin -json 0 { "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "4", "login_protocol": "iscsi", "logins": [{ "login": "0", "node_id": "1", "node_name": "node1", "port_id": "2", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no" }, {"login": "1", "node_id": "1", "node_name": "node1", "port_id": "3", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "no"}, { "login": "2", "node_id": "1", "node_name": "node1", "port_id": "2", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "yes" }, {"login": "3", "node_id": "1", "node_name": "node1", "port_id": "3", "host_port_grp_id": "1", "protocol": "iscsi", "ip_version": "IPv4", "failover": "yes"} ] }
* This example covers following scenario: 1. IQN "iqn.1996-04.de.suse:01:d4aba8f69a95" has logged onto node1 (node_id: 1 IOgrp: 0) port 2 and node2 (node_id: 2 IOgrp: 0) port 2 with IPv4 version. Both the connections are over iSCSI. 2. IQN "iqn.1996-04.de.suse:03:d3bse3e25l70" has logged onto node3 (node_id: 3 IOgrp: 1) port 5 and node4 (node_id: 4 IOgrp: 1) port 5 with IPv4 version. Both the connections are over iSER. # svctask mkhost -iscsiname "iqn.1996-04.de.suse:03:d3bse3e25l70" Host, id [1], successfully created # lshost id name port_count iogrp_count status site_id site_name host_cluster_id host_cluster_name 0 host0 1 4 online 1 host1 1 4 online Concise View # lshostiplogin id name host_id host_name login_count login_protocol 0 iqn.1996-04.de.suse:01:d4aba8f69a95 0 host0 2 iscsi 1 iqn.1996-04.de.suse:03:d3bse3e25l70 1 host1 2 iser Json View # lshostiplogin -json [{ "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "2", "login_protocol": "iscsi" }, { "id": "1", "name": "iqn.1996-04.de.suse:03:d3bse3e25l70", "host_id": "1", "host_name": "host1", "login_count": "2", "login_protocol": "iser" }] Detailed View 0 # lshostiplogin 0 id 0 name iqn.1996-04.de.suse:01:d4aba8f69a95 host_id 0 host_name host0 login_count 2 login_protocol iscsi login 0 node_id 1 node_name node1 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no login 1 node_id 2 node_name node2 port_id 2 host_port_grp_id 1 protocol iscsi ip_version IPv4 failover no Json View # lshostiplogin -json 0 { "id": "0", "name": "iqn.1996-04.de.suse:01:d4aba8f69a95", "host_id": "0", "host_name": "host0", "login_count": "2", "login_protocol": "iscsi", "logins": [ { "login": "0", "node_id": "1", "node_name": "node1", "port_id": "2", "host_port_grp_id": "1", "protocols": "iscsi", "ip_version": "IPv4", "failover": "no"}, { "login": "1", "node_id": "2", "node_name": "node2", "port_id": "2", "host_port_grp_id": "1", "protocols": "iscsi", "ip_version": "IPv4", "failover": "no" } ] } Detailed View 1 # lshostiplogin 1 id 1 name iqn.1996-04.de.suse:03:d3bse3e25l7 host_id 1 host_name host1 login_count 2 login_protocol iser login 0 node_id 3 node_name node3 port_id 5 host_port_grp_id 2 protocol iser ip_version IPv4 failover no login 1 node_id 4 node_name node4 port_id 5 host_port_grp_id 2 protocol iser ip_version IPv4 failover no Json View # lshostiplogin -json 1 { "id": "1", "name": "iqn.1996-04.de.suse.03:d3bse3e25l7", "host_id": "1", "host_name": "host1", "login_count": "2", "login_protocol": "iser", "logins": [ { "login": "0", "node_id": "3", "node_name": "node3", "port_id": "5", "host_port_grp_id": "2", "protocols": "iser", "ip_version": "IPv4", "failover": "no"}, { "login": "1", "node_id": "4", "node_name": "node4", "port_id": "5", "host_port_grp_id": "2", "protocols": "iser", "ip_version": "IPv4", "failover": "no" } ] }