Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#55 FibreChannel

open
5
2007-03-20
2007-03-20
Anonymous
No

Microsoft has a small util called FCINFO (http://www.microsoft.com/downloads/details.aspx?FamilyID=73d7b879-55b2-4629-8734-b0698096d3b1&DisplayLang=en ) that installs some extra WMI-classes. Together with them the following vbscript ......

' (VBScript)
Function WWNToString(arrayWWN)
WWNToString = Hex0(arrayWWN(0))
For I = 1 To 7
WWNToString = WWNToString & ":" & Hex0(arrayWWN(I))
Next
End Function

Function Hex0(n)
Hex0 = Hex(n)
If (n < &h10) Then Hex0 = "0" & Hex0
End Function

' (VBScript)
' Connect to WMI.
Set oWbemServices = GetObject("winmgmts:{impersonationLevel=impersonate}!root/wmi")

Set enumSetAdapters = oWbemServices.InstancesOf("MSFC_FCAdapterHBAAttributes")
Set enumSetPorts = oWbemServices.InstancesOf("MSFC_FibrePortHBAAttributes")
nIndex = 0
For Each oEltAdapter in enumSetAdapters
For Each oEltPort in enumSetPorts
If (oEltAdapter.InstanceName = oEltPort.InstanceName) Then
WScript.Echo " Model: " & oEltAdapter.Model
WScript.Echo " HardwareVersion: " & oEltAdapter.HardwareVersion
WScript.Echo " DriverVersion: " & oEltAdapter.DriverVersion
WScript.Echo " OptionROMVersion: " & oEltAdapter.OptionROMVersion
WScript.Echo " FirmwareVersion: " & oEltAdapter.FirmwareVersion
WScript.Echo " DriverName: " & oEltAdapter.DriverName
WScript.Echo " Status: " & oEltAdapter.HBAStatus
WScript.Echo " node_wwn: " & WWNToString(oEltAdapter.NodeWWN)
WScript.Echo " port_wwn: " & WWNToString(oEltPort.Attributes.PortWWN)
WScript.Echo
nIndex = nIndex + 1
End If
Next ' oEltPort
Next ' oEltAdapter

Gives the following information!

Model: QMH2462
HardwareVersion:
DriverVersion: 9.1.0.18 (w32)
OptionROMVersion: 1.16
FirmwareVersion: 4.00.12
DriverName: ql2300.sys
Status: 0
node_wwn: 50:01:10:A0:00:19:57:A8
port_wwn: 50:01:10:A0:00:19:57:A8

Model: QMH2462
HardwareVersion:
DriverVersion: 9.1.0.18 (w32)
OptionROMVersion: 1.16
FirmwareVersion: 4.00.12
DriverName: ql2300.sys
Status: 0
node_wwn: 50:01:10:A0:00:19:57:AA
port_wwn: 50:01:10:A0:00:19:57:AA

Discussion