Fetch WWPN Address


Task 1 : Check how many fiber change adapters are there on the Server with below command

#lsdev -Cc adapter

Example

# lsdev -Cc adapter

ent0 Available 00-00 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent1 Available 00-01 2-Port 10/100/1000 Base-TX PCI-Express Adapter 
ent2 Available 01-00 2-Port 10/100/1000 Base-TX PCI-Express Adapter 
ent3 Available 01-01 2-Port 10/100/1000 Base-TX PCI-Express Adapter 
ent4 Available EtherChannel / IEEE 802.3ad Link Aggregation
ent5 Available EtherChannel / IEEE 802.3ad Link Aggregation
fcs0 Available 02-00 8Gb PCI Express Dual Port FC Adapter 
fcs1 Available 02-01 8Gb PCI Express Dual Port FC Adapter 
fcs2 Available 04-00 8Gb PCI Express Dual Port FC Adapter 
fcs3 Available 04-01 8Gb PCI Express Dual Port FC Adapter 
sissas0 Available 03-00 PCI Express x8 Ext Dual-x4 3Gb SAS Adapter
vsa0 Available LPAR Virtual Serial Adapter


Alternatively you can run below command to grep  fiber channel adapter fcs on the system

#lsdev -Cc adapter |grep fcs
fcs0 Available 
fcs1 Available 
fcs2 Available 
fcs3 Available 


From above we can conclude that we have two fiber channel adapters or HBA cards fcs0 , fcs1, fc2 and fc3.

Task 2 : Locate “Network Address” and it’s correspong numeric value means “WWPN Address” on the configuration details of each fcs adapters as below in blue color.

# lscfg -vl fcs0
Device Specific.(ZM)........3
Network Address.............10000000C9B84414
ROS Level and ID............02781174


Now let see the configuration details of fcs1

Alternatively you can run the below command to grep for “Network Address” on each fiber 
channel adapter fcs to get “WWPN Address”

#lscfg -vl fcs0 | grep "Network Address"
Network Address.............10000000C9B84414

Sort Script to get it all at once - 

for i in $(lsdev -Cc adapter |grep fcs|cut -d" " -f1); do echo $i;lscfg -vl $i|grep -i network;done

No comments:

Post a Comment