lshostiplogin
Use the lshostiplogin command to list the login session type such as associated host object, login counts login protocol 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.
Syntax
Parameters
- (Optional) Object identifier that indicates a configured host IQN, for which login details are to be displayed. This value must be a number in the range 0 - 2047 (Max number of configured iSCSI/iSER IQNs per SVC cluster [512 x 4 = 2048]).
- (Optional) Object name that indicates a configured host IQN name, for which login details are to be displayed.
- (Optional) Specifies a list of one or more filter attributes that matches the specified values; see -filtervalue? for the supported attributes.
- (Optional) Includes all of the valid filter attributes in the report. The following filter
attributes are valid for the lshostiplogin command:
- login_protocol
- host_id
- host_name
For more information about filtering attributes, see Attributes of the -filtervalue parameters.
Note:
Following are added as ownership rules:
- Global user is allowed to view login information of all host objects.
- Restricted users can view login information only for owned host objects and global host objects.
Description
This command lists the login session type and other details.
This table provides the attribute values that can be displayed as output view data.
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 lsportethernet view to which login is established. This value is a number in the range of 1 - 12. |
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. |
Note: Individual IQNs within a host object may be associated with
different ownership. This command will display host objects' login information based on
ownership.
A concise view for global user
lshostiplogin
The concise resulting output:
id name host_id host_name login_count login_protocol owner_id owner_name
0 iqn.1994-05.com.redhat:315f499b71d0 0 perfm5_25g 1 iSCSI 0 ownershipgroup0
1 iqn.1994-05.com.redhat:315f499b71d1 1 perfM50 0
2 iqn.1994-05.com.redhat:315f499b71d2 2 perfM51 0 1 ownershipgroup1
A detailed view for global user
lshostiplogin 0
The concise resulting output:
id 0
name iqn.1994-05.com.redhat:315f499b71d0
host_id 0
host_name perfm5_25g
login_count 1
login_protocol iSCSI
owner_id 0
owner_name ownershipgroup0
login 0
node_id 1
node_name node1
port_id 6
protocol iSCSI
ip_version IPv4
failover no
A concise invocation for global user view
lshost
The concise resulting output:
id name port_count iogrp_count status site_id site_name host_cluster_id host_cluster_name protocol owner_id owner_name portset_id portset_name
0 perfm5_25g 1 4 online scsi 0 ownershipgroup0 4 portset4
1 perfM50 1 4 offline scsi 0 portset0
2 perfM51 1 4 offline scsi 1 ownershipgroup1 5 portset5
A concise invocation for global user view
lshostiplogin
The concise resulting output:
id name host_id host_name login_count login_protocol owner_id owner_name
0 iqn.1994-05.com.redhat:315f499b71d0 0 perfm5_25g 1 iSCSI 0 ownershipgroup0
1 iqn.1994-05.com.redhat:315f499b71d1 1 perfM50 0
2 iqn.1994-05.com.redhat:315f499b71d2 2 perfM51 0 1 ownershipgroup1
A concise invocation for restricted user 0 (from ownershipgroup0) view
lshostiplogin
The concise resulting output:
id name host_id host_name login_count login_protocol owner_id owner_name
0 iqn.1994-05.com.redhat:315f499b71d0 0 perfm5_25g 1 iSCSI 0 ownershipgroup0
1 iqn.1994-05.com.redhat:315f499b71d1 1 perfM50 0
A concise invocation for restricted user 1 (from ownershipgroup1) view
lshostiplogin
The concise resulting output:
id name host_id host_name login_count login_protocol owner_id owner_name
1 iqn.1994-05.com.redhat:315f499b71d1 1 perfM50 0
2 iqn.1994-05.com.redhat:315f499b71d2 1 perfM51 0 1 ownershipgroup1
Example 1
* 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
protocol iscsi
ip_version IPv4
failover no
login 1
node_id 1
node_name node1
port_id 3
protocol iscsi
ip_version IPv4
failover no
login 2
node_id 2
node_name node2
port_id 2
protocol iscsi
ip_version IPv4
failover no
login 3
node_id 2
node_name node2
port_id 3
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",
"node_name": "node1", "port_id": "3", , "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",
"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
protocol iscsi
ip_version IPv4
failover no
login 0
node_id 1
node_name node1
port_id 3
protocol iscsi
ip_version IPv4
failover no
login 2
node_id 2
node_name node2
port_id 3
protocol iscsi
ip_version IPv4
failover no
login 3
node_id 2
node_name node2
port_id 2
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",
"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", "protocol":
"iscsi", "ip_version": "IPv4", "failover": "no"}, {"login": "3", "node_id": "2", "node_name": "node2", "port_id": "2",
"protocol": "iscsi", "ip_version": "IPv4", "failover": "no"} ] }
Example 2
* 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
protocol iscsi
ip_version IPv4
failover no
login 1
node_id 1
node_name node1
port_id 3
protocol iscsi
ip_version IPv4
failover no
login 2
node_id 1
node_name node1
port_id 2
protocol iscsi
ip_version IPv4
failover yes
login 3
node_id 1
node_name node1
port_id 3
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",
"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", "protocol": "iscsi",
"ip_version": "IPv4", "failover": "yes" }, {"login": "3", "node_id": "1", "node_name": "node1", "port_id": "3",
"protocol": "iscsi", "ip_version": "IPv4", "failover": "yes"} ] }
Example 3
* 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
protocol iscsi
ip_version IPv4
failover no
login 1
node_id 2
node_name node2
port_id 2
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",
"protocols": "iscsi", "ip_version": "IPv4", "failover": "no"}, { "login": "1", "node_id": "2",
"node_name": "node2", "port_id": "2", "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
protocol iser
ip_version IPv4
failover no
login 1
node_id 4
node_name node4
port_id 5
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", "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" } ] }