show flogi database
show flogi database
import requests
import json
"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show flogi database",
"output_format": "json"
}
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
{
"TABLE_flogi_entry": {
"ROW_flogi_entry": [
{
"fcid": "0x2c0020",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2c:25",
"vsan": 1
},
{
"fcid": "0x2c0021",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2d:25",
"vsan": 1
},
{
"fcid": "0x2c0000",
"interface": "fc1/18",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:dc:25",
"vsan": 1
},
{
"fcid": "0x2c0001",
"interface": "fc1/18",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:dc:35",
"vsan": 1
},
{
"fcid": "0x2c0040",
"interface": "sup-fc0",
"node_name": "20:00:00:de:fb:b1:86:a0",
"port_name": "10:00:00:de:fb:b1:86:a1",
"vsan": 1
}
]
},
"total_no_of_flogi": 5
}
<TABLE_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0020</fcid>
<port_name>10:00:54:7f:ee:eb:2c:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0021</fcid>
<port_name>10:00:54:7f:ee:eb:2d:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/18</interface>
<vsan>1</vsan>
<fcid>0x2c0000</fcid>
<port_name>10:00:54:7f:ee:eb:dc:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/18</interface>
<vsan>1</vsan>
<fcid>0x2c0001</fcid>
<port_name>10:00:54:7f:ee:eb:dc:35</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>sup-fc0</interface>
<vsan>1</vsan>
<fcid>0x2c0040</fcid>
<port_name>10:00:00:de:fb:b1:86:a1</port_name>
<node_name>20:00:00:de:fb:b1:86:a0</node_name>
</ROW_flogi_entry>
</TABLE_flogi_entry>
<total_no_of_flogi>5</total_no_of_flogi>
The show flogi database command displays information of all the FLOGI sessions.
For command descriptions, see the Cisco MDS 9000 Series Switches Command References.
Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.
| CLI Output |
|---|
|
| Parameter | Description | Type | Sample Values |
|---|---|---|---|
| interface | Interface name | String | ['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel'] |
| vsan | VSAN ID | Integer | ['1-4094'] |
| total_no_of_flogi | Total number of logins | Integer | |
| node_name | Node WWN | String | |
| port_name | Port WWN | String | |
| fcid | FCID of device | String | |
| device_alias_for_pwwn | Device alias of port WWN | String |
show flogi database fcid <*fcid_id*>
show flogi database fcid <fcid_id>
import requests
import json
"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show flogi database fcid <fcid_id>",
"output_format": "json"
}
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
{
"TABLE_flogi_entry": {
"ROW_flogi_entry": {
"fcid": "0x2c0020",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2c:25",
"vsan": 1
}
},
"total_no_of_flogi": 1
}
<TABLE_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0020</fcid>
<port_name>10:00:54:7f:ee:eb:2c:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
</TABLE_flogi_entry>
<total_no_of_flogi>1</total_no_of_flogi>
The show flogi database fcid <*fcid_id*> command displays FLOGI database entries based on the FCID allocated.
For command descriptions, see the Cisco MDS 9000 Series Switches Command References.
Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.
| CLI Output |
|---|
|
| Parameter | Description | Type | Sample Values |
|---|---|---|---|
| interface | Interface name | String | ['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel'] |
| vsan | VSAN ID | Integer | ['1-4094'] |
| total_no_of_flogi | Total number of logins | Integer | |
| fcid | FCID of device | String | |
| node_name | Node WWN | String | |
| port_name | Port WWN | String | |
| device_alias_for_pwwn | Device alias of port WWN | String |
show flogi database interface <*interface_id*>
show flogi database interface <interface_id>
import requests
import json
"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show flogi database interface <interface_id>",
"output_format": "json"
}
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
{
"TABLE_flogi_entry": {
"ROW_flogi_entry": [
{
"fcid": "0x2c0020",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2c:25",
"vsan": 1
},
{
"fcid": "0x2c0021",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2d:25",
"vsan": 1
}
]
},
"total_no_of_flogi": 2
}
<TABLE_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0020</fcid>
<port_name>10:00:54:7f:ee:eb:2c:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0021</fcid>
<port_name>10:00:54:7f:ee:eb:2d:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
</TABLE_flogi_entry>
<total_no_of_flogi>2</total_no_of_flogi>
The show flogi database interface <*interface_id*> command displays FLOGI database entries based on the logged in interface.
For command descriptions, see the Cisco MDS 9000 Series Switches Command References.
Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.
| CLI Output |
|---|
|
| Parameter | Description | Type | Sample Values |
|---|---|---|---|
| interface | Interface name | String | ['sup-fc', 'fc', 'vfc', 'port-channel', 'vfc-port-channel'] |
| vsan | VSAN ID | Integer | ['1-4094'] |
| total_no_of_flogi | Total number of logins | Integer | |
| node_name | Node WWN | String | |
| port_name | Port WWN | String | |
| fcid | FCID of the device | String | |
| device_alias_for_pwwn | Device alias of port WWN | String |
show flogi database module <*module_number*>
show flogi database module <module_number>
import requests
import json
"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show flogi database module 1",
"output_format": "json"
}
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
{
"TABLE_flogi_entry": {
"ROW_flogi_entry": [
{
"fcid": "0x2c0020",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2c:25",
"vsan": 1
},
{
"fcid": "0x2c0021",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2d:25",
"vsan": 1
},
{
"fcid": "0x2c0000",
"interface": "fc1/18",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:dc:25",
"vsan": 1
},
{
"fcid": "0x2c0001",
"interface": "fc1/18",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:dc:35",
"vsan": 1
}
]
},
"total_no_of_flogi": 4
}
<TABLE_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0020</fcid>
<port_name>10:00:54:7f:ee:eb:2c:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0021</fcid>
<port_name>10:00:54:7f:ee:eb:2d:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/18</interface>
<vsan>1</vsan>
<fcid>0x2c0000</fcid>
<port_name>10:00:54:7f:ee:eb:dc:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/18</interface>
<vsan>1</vsan>
<fcid>0x2c0001</fcid>
<port_name>10:00:54:7f:ee:eb:dc:35</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
</TABLE_flogi_entry>
<total_no_of_flogi>4</total_no_of_flogi>
The show flogi database module <*module_number*> command displays FLOGI database entries based module number.
For command descriptions, see the Cisco MDS 9000 Series Switches Command References.
Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.
| CLI Output |
|---|
|
| Parameter | Description | Type | Sample Values |
|---|---|---|---|
| interface | Interface name | String | ['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel'] |
| vsan | VSAN ID | Integer | ['1-4094'] |
| total_no_of_flogi | Total number of logins | Integer | |
| node_name | Node WWN | String | |
| port_name | Port WWN | String | |
| fcid | FCID of device | String | |
| device_alias_for_pwwn | Device alias of port WWN | String |
show flogi database vsan <*vsan_id*>
show flogi database vsan <vsan_id>
import requests
import json
"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show flogi database vsan <vsan_id>",
"output_format": "json"
}
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
{
"TABLE_flogi_entry": {
"ROW_flogi_entry": [
{
"fcid": "0x2c0020",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2c:25",
"vsan": 1
},
{
"fcid": "0x2c0021",
"interface": "fc1/17",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:2d:25",
"vsan": 1
},
{
"fcid": "0x2c0000",
"interface": "fc1/18",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:dc:25",
"vsan": 1
},
{
"fcid": "0x2c0001",
"interface": "fc1/18",
"node_name": "20:05:00:11:0d:fd:5f:00",
"port_name": "10:00:54:7f:ee:eb:dc:35",
"vsan": 1
},
{
"fcid": "0x2c0040",
"interface": "sup-fc0",
"node_name": "20:00:00:de:fb:b1:86:a0",
"port_name": "10:00:00:de:fb:b1:86:a1",
"vsan": 1
}
]
},
"total_no_of_flogi": 5
}
<TABLE_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0020</fcid>
<port_name>10:00:54:7f:ee:eb:2c:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/17</interface>
<vsan>1</vsan>
<fcid>0x2c0021</fcid>
<port_name>10:00:54:7f:ee:eb:2d:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/18</interface>
<vsan>1</vsan>
<fcid>0x2c0000</fcid>
<port_name>10:00:54:7f:ee:eb:dc:25</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>fc1/18</interface>
<vsan>1</vsan>
<fcid>0x2c0001</fcid>
<port_name>10:00:54:7f:ee:eb:dc:35</port_name>
<node_name>20:05:00:11:0d:fd:5f:00</node_name>
</ROW_flogi_entry>
<ROW_flogi_entry>
<interface>sup-fc0</interface>
<vsan>1</vsan>
<fcid>0x2c0040</fcid>
<port_name>10:00:00:de:fb:b1:86:a1</port_name>
<node_name>20:00:00:de:fb:b1:86:a0</node_name>
</ROW_flogi_entry>
</TABLE_flogi_entry>
<total_no_of_flogi>5</total_no_of_flogi>
The show flogi database vsan <*vsan_id*> command displays FLOGI database entries based on the VSAN ID.
For command descriptions, see the Cisco MDS 9000 Series Switches Command References.
Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.
| CLI Output |
|---|
|
| Parameter | Description | Type | Sample Values |
|---|---|---|---|
| interface | Interface name | String | ['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel'] |
| vsan | VSAN ID | Integer | ['1-4094'] |
| total_no_of_flogi | Total number of logins | Integer | |
| fcid | FCID of device | String | |
| node_name | Node WWN | String | |
| port_name | Port WWN | String | |
| device_alias_for_pwwn | Device alias of port WWN | String |