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
switch# show flogi database

--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/17 1 0x2c0020 10:00:54:7f:ee:eb:2c:25 20:05:00:11:0d:fd:5f:00
fc1/17 1 0x2c0021 10:00:54:7f:ee:eb:2d:25 20:05:00:11:0d:fd:5f:00
fc1/18 1 0x2c0000 10:00:54:7f:ee:eb:dc:25 20:05:00:11:0d:fd:5f:00
fc1/18 1 0x2c0001 10:00:54:7f:ee:eb:dc:35 20:05:00:11:0d:fd:5f:00
sup-fc0 1 0x2c0040 10:00:00:de:fb:b1:86:a1 20:00:00:de:fb:b1:86:a0

Total number of flogi = 5.
ParameterDescriptionTypeSample Values
interfaceInterface nameString['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel']
vsanVSAN IDInteger['1-4094']
total_no_of_flogiTotal number of loginsInteger
node_nameNode WWNString
port_namePort WWNString
fcidFCID of deviceString
device_alias_for_pwwnDevice alias of port WWNString

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
switch# show flogi database fcid 0x2c0020

--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/17 1 0x2c0020 10:00:54:7f:ee:eb:2c:25 20:05:00:11:0d:fd:5f:00

Total number of flogi = 1.
ParameterDescriptionTypeSample Values
interfaceInterface nameString['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel']
vsanVSAN IDInteger['1-4094']
total_no_of_flogiTotal number of loginsInteger
fcidFCID of deviceString
node_nameNode WWNString
port_namePort WWNString
device_alias_for_pwwnDevice alias of port WWNString

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
switch# show flogi database interface fc1/17

--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/17 1 0x2c0020 10:00:54:7f:ee:eb:2c:25 20:05:00:11:0d:fd:5f:00
fc1/17 1 0x2c0021 10:00:54:7f:ee:eb:2d:25 20:05:00:11:0d:fd:5f:00

Total number of flogi = 2.
ParameterDescriptionTypeSample Values
interfaceInterface nameString['sup-fc', 'fc', 'vfc', 'port-channel', 'vfc-port-channel']
vsanVSAN IDInteger['1-4094']
total_no_of_flogiTotal number of loginsInteger
node_nameNode WWNString
port_namePort WWNString
fcidFCID of the deviceString
device_alias_for_pwwnDevice alias of port WWNString

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
switch# show flogi database module 1

--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/17 1 0x2c0020 10:00:54:7f:ee:eb:2c:25 20:05:00:11:0d:fd:5f:00
fc1/17 1 0x2c0021 10:00:54:7f:ee:eb:2d:25 20:05:00:11:0d:fd:5f:00
fc1/18 1 0x2c0000 10:00:54:7f:ee:eb:dc:25 20:05:00:11:0d:fd:5f:00
fc1/18 1 0x2c0001 10:00:54:7f:ee:eb:dc:35 20:05:00:11:0d:fd:5f:00

Total number of flogi = 4.
ParameterDescriptionTypeSample Values
interfaceInterface nameString['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel']
vsanVSAN IDInteger['1-4094']
total_no_of_flogiTotal number of loginsInteger
node_nameNode WWNString
port_namePort WWNString
fcidFCID of deviceString
device_alias_for_pwwnDevice alias of port WWNString

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
switch# show flogi database vsan 1

--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/17 1 0x2c0020 10:00:54:7f:ee:eb:2c:25 20:05:00:11:0d:fd:5f:00
fc1/17 1 0x2c0021 10:00:54:7f:ee:eb:2d:25 20:05:00:11:0d:fd:5f:00
fc1/18 1 0x2c0000 10:00:54:7f:ee:eb:dc:25 20:05:00:11:0d:fd:5f:00
fc1/18 1 0x2c0001 10:00:54:7f:ee:eb:dc:35 20:05:00:11:0d:fd:5f:00
sup-fc0 1 0x2c0040 10:00:00:de:fb:b1:86:a1 20:00:00:de:fb:b1:86:a0

Total number of flogi = 5.
ParameterDescriptionTypeSample Values
interfaceInterface nameString['sup-fc', 'fc', 'port-channel', 'vfc', 'vfc-port-channel']
vsanVSAN IDInteger['1-4094']
total_no_of_flogiTotal number of loginsInteger
fcidFCID of deviceString
node_nameNode WWNString
port_namePort WWNString
device_alias_for_pwwnDevice alias of port WWNString