Find WWN Address in AIX

By Parthiban Ponnusamy

Here is the steps to find the WWN Address of Fiber channel Adapter in AIX Server.


First We will find out all the installed FC (Fiber channel) Adapters in AIX Server.


To do, type the following command:


# lsdev -Cc adapter | grep fcs
fcs0 Available 01-10 FC Adapter
fcs1 Available 01-11 FC Adapter


The above output shows all the FC Adapters installed on the AIX server.


Now to Find out the WWN Number (Address) of each Adapter, type the following command:



# lscfg -vl fcs0
fcs0 U788D.001.KQ12FC0-P1-C5-T1 FC Adapter


Network Address.............210000F08B9B4311 <-- WWN Number of FCS1 Adapter
ROS Level and ID............49535020
Device Specific.(Z0)........00040016
Device Specific.(Z1)........01110003
Device Specific.(Z2)........49535020
Device Specific.(Z3)........00002422
Device Specific.(Z4)........000E0002
Device Specific.(Z5)........00010009
Device Specific.(Z6)........00010002
Device Specific.(Z7)........00000000
Device Specific.(Z8)........210000E08B9B4311
Device Specific.(Z9)........ISP
Device Specific.(YL)........U788D.001.KQ00FC0-P1-C5-T1


# lscfg -vl fcs1
fcs1 U788D.001.KQ12FC0-P1-C5-T2 FC Adapter


Network Address.............210100F08BBB4311 <-- WWN Number of FCS1 Adapter
ROS Level and ID............49535020
Device Specific.(Z0)........00040016
Device Specific.(Z1)........01110003
Device Specific.(Z2)........49535020
Device Specific.(Z3)........00002422
Device Specific.(Z4)........000E0002
Device Specific.(Z5)........00010009
Device Specific.(Z6)........00010002
Device Specific.(Z7)........00000001
Device Specific.(Z8)........210100E08BBB4311
Device Specific.(Z9)........ISP
Device Specific.(YL)........U788D.001.KQ00FC0-P1-C5-T2


For Further Reading,
AIX, Quick HOWTO

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

{ 13 comments... read them below or add one }

Anonymous said...

Thank you - this command worked and helped us find the WWN in our new VIOS!

Much appreciated.

Anonymous said...

Thanks for this one.
Can you also include something about the ODM packages required for Multipathing.

Parthiban Ponnusamy said...

Will Post new article on this soon.. Thanks for your comments..!

nayabrasool said...

this is really helpfulllllllllllllll!!!!!!!!!!

Anonymous said...

thank u dude

Paul M said...

Parthiban - Great post! I use this so much to get WWN's for our SAN team that I made it a function and put it in roots .bashrc:

function getwwn { for i in `lsdev | grep fcs | awk '{print $1}'`; do lscfg -vpl $i | grep Network; done }

That should be all one line by the way in case the web page wraps it. The output is sorted in ascending order beginning with fcs0 and looks like this:

Network Address.............10000000C9A5F8FC
Network Address.............10000000C9A5F8FD
Network Address.............210000215EE2A42D
Network Address.............210000215EE2A42F
Network Address.............10000000C9B620D2
Network Address.............10000000C9B620D3

Parthiban Ponnusamy said...

Thank you Paul..!

Anonymous said...

Nice blog Parthi, Much appreciated work

Anonymous said...

Ok.

Obrigado.. Brazil...

Ben @ Geekswing said...

Hiya, nice post

If available, fcstat will gives a lot of great info too

e.g.

# fcstat fcs0

FIBRE CHANNEL STATISTICS REPORT: fcs0

Device Type: 4Gb FC PCI Express Adapter (df1000fe) (adapter/pciex/df1000fe)
Serial Number: 1B84204CD5
Option ROM Version: 02E8277F
ZA: Z1F2.70A5
World Wide Node Name: 0x20000000C980DBE8
World Wide Port Name: 0x10000000C980DBE8

FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 4 GBIT
Port Speed (running): 4 GBIT
Port FC ID: 0x000001
Port Type: Private Loop

Seconds Since Last Reset: 1219675

Transmit Statistics Receive Statistics
------------------- ------------------
Frames: 203978 407400
Words: 2862592 12623616

LIP Count: 1
NOS Count: 0
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 0
Loss of Sync Count: 4
Loss of Signal: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 7
Invalid CRC Count: 0

IP over FC Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0

FC SCSI Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
No Command Resource Count: 0

IP over FC Traffic Statistics
Input Requests: 0
Output Requests: 0
Control Requests: 0
Input Bytes: 0
Output Bytes: 0

FC SCSI Traffic Statistics
Input Requests: 203340
Output Requests: 10
Control Requests: 51
Input Bytes: 51849495
Output Bytes: 252

Majid Varzideh said...

thanks for your nice post.i have a question about pwwn of multiport hbas, how can i find the wwn of individual ports?
i have a dual port hba which i want to know the pwwn of each port, but even fcstat does not show that.
thanks

Anonymous said...

Very useful, thank you very much!.

Anonymous said...

Thank you Parthiban. This command helped to find the WWN.

Post a Comment

What do you think about this Article? Add your Opinion..!