cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1354
Views
0
Helpful
2
Replies

Obtaining Negotiated Speed of FC Links using Cisco Powertool

Neville George
Level 1
Level 1

I can obtain the speed of the Network Uplinks on the Cisco FI-s using the command

Get-UcsFiLanCloud -Id "A" | Get-UcsUplinkPort -AdminState "enabled" | Foreach-Object { $_.adminspeed }

However, there is no option to obtain the negotiated speed of the Fiber Channel Uplinks from the Cisco FI-s. There is no AdminSpeed Property from the output of the below command

Get-UcsFiSanCloud -Id "A"| Get-UcsFcUplinkPort -AdminState "enabled"

Is it possible to get the negotiated speed of the FC Links? If so, kindly provide the powertool command.

1 Accepted Solution

Accepted Solutions

ericwill
Cisco Employee
Cisco Employee

You can take a different approach to getting them.  I specify the "network-element" cmdlet to get all of the FI's, specify the "Module" that I want to get information from (id 1 = the fixed ports, id 2 = the first expansion slot in the FI, id 3 = the second expansion slot in the FI if present), specify the port groups that are FC, get all of those ports, and then use a select statement to filter the data down.  As you can see below, my FC ports are negotiated at 4gpbs.

PS C:\ucs> Get-UcsNetworkElement | Get-UcsFiModule -Id 1 | Get-UcsPortGroup -Transport fc | Get-UcsFiFcPort | select dn, epdn, admintransport, adminstate, operspeed | Format-Table

Dn                                      EpDn                                    AdminTransport                          AdminState                              OperSpeed

--                                      ----                                    --------------                          ----------                              ---------

sys/switch-A/slot-1/switch-fc/port-31   fabric/san/A/phys-slot-1-port-31        fc                                      enabled                                 4gbps

sys/switch-A/slot-1/switch-fc/port-32   fabric/san/A/phys-slot-1-port-32        fc                                      enabled                                 4gbps

sys/switch-B/slot-1/switch-fc/port-31   fabric/san/B/phys-slot-1-port-31        fc                                      enabled                                 4gbps

sys/switch-B/slot-1/switch-fc/port-32   fabric/san/B/phys-slot-1-port-32        fc                                      enabled                                 4gbps

If you weren't aware, there is a great command called get-ucscmdletmeta.  It will help in understanding how things are defined in the UCS XML model.

Here are some example usages:

Get-UcsCmdletMeta -noun ucsnetworkelement -Tree

(I've removed the output since it was very long, but it will give you all the hierarchy of all the sub classes that are children to network element, the XML class names for each, and the appropriate PowerShell verbs and nouns for querying and manipulating the classes.

PS C:\ucs> Get-UcsCmdletMeta -noun ucsfifcport

ClassId                   : FcPIo

Noun                      : UcsFiFcPort

Verb                      : Get

PipelineClassId           : {PortGroup}

LimitScopePipelineClassId : {}

MoMeta                    : Cisco.Ucs.UcsMoMeta

----This output shows the cmdlets available for getting information about a FC Port.  You can see the PipelineClassID shows PortGroup, which signifies the classes / PoSh nouns that are pipelineable into this class

PS C:\ucs> Get-UcsCmdletMeta -noun ucsfifcport | select -ExpandProperty mometa

ClassId         : FcPIo

XmlTag          : fcPIo

Rn              : port-[PortId]

MinVersion      : 1.0(1e)

Access          : InputOutput

ChildClassId    : {EquipmentXcvr, EventInst, FaultInst, FcErrStats...}

AccessPrivilege : {read-only}

PropertyMeta    : {AdminState, AdminTransport, ChassisId, Dn...}

----- Here you can see the Managed Object (MO) meta data about the FC Port class.  You can see it was added in UCSM 1.0(1e), and needs only the "Read-Only" Privelege to view it.

PS C:\ucs> Get-UcsCmdletMeta -noun ucsfifcport | select -ExpandProperty mometa | select -ExpandProperty propertymeta | ft -AutoSize

Restriction                      Name           XmlAttribute   Type            MinVersion    Access

-----------                      ----           ------------   ----            ----------    ------

Cisco.Ucs.UcsPropertyRestriction AdminState     adminState     System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction AdminTransport adminTransport System.String   2.0(1m)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction ChassisId      chassisId      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Dn             dn             System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Encap          encap          System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction EpDn           epDn           System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction IfRole         ifRole         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction IfType         ifType         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Lc             lc             System.String   2.0(1m)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction LicGP          licGP          System.UInt64   1.4(1i)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction LicState       licState       System.String   1.4(1i)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Locale         locale         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Mode           mode           System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Model          model          System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Name           name           System.String   1.0(1e)    ReadWrite

Cisco.Ucs.UcsPropertyRestriction OperSpeed      operSpeed      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction OperState      operState      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerChassisId  peerChassisId  System.String   1.4(1i)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerDn         peerDn         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerPortId     peerPortId     System.UInt32   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerSlotId     peerSlotId     System.UInt32   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PortId         portId         System.UInt32   1.0(1e)       Naming

Cisco.Ucs.UcsPropertyRestriction Revision       revision       System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Rn             rn             System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Serial         serial         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction SlotId         slotId         System.UInt32   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction StateQual      stateQual      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Status         status         System.String   1.0(1e)    ReadWrite

Cisco.Ucs.UcsPropertyRestriction SwitchId       switchId       System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Transport      transport      System.String[] 1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Ts             ts             System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Type           type           System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction UnifiedPort    unifiedPort    System.String   2.0(1m)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction UsrLbl         usrLbl         System.String   1.4(1i)    ReadWrite

Cisco.Ucs.UcsPropertyRestriction Vendor         vendor         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Wwn            wwn            System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction XcvrType       xcvrType       System.String   1.4(1i)     ReadOnly

---In this example I'm showing all of the properties for the FC Port class.  As you can see OperSpeed is the property you are most concerned about.

Let me know if you have futher questions!!

Thanks,
Eric     

View solution in original post

2 Replies 2

ericwill
Cisco Employee
Cisco Employee

You can take a different approach to getting them.  I specify the "network-element" cmdlet to get all of the FI's, specify the "Module" that I want to get information from (id 1 = the fixed ports, id 2 = the first expansion slot in the FI, id 3 = the second expansion slot in the FI if present), specify the port groups that are FC, get all of those ports, and then use a select statement to filter the data down.  As you can see below, my FC ports are negotiated at 4gpbs.

PS C:\ucs> Get-UcsNetworkElement | Get-UcsFiModule -Id 1 | Get-UcsPortGroup -Transport fc | Get-UcsFiFcPort | select dn, epdn, admintransport, adminstate, operspeed | Format-Table

Dn                                      EpDn                                    AdminTransport                          AdminState                              OperSpeed

--                                      ----                                    --------------                          ----------                              ---------

sys/switch-A/slot-1/switch-fc/port-31   fabric/san/A/phys-slot-1-port-31        fc                                      enabled                                 4gbps

sys/switch-A/slot-1/switch-fc/port-32   fabric/san/A/phys-slot-1-port-32        fc                                      enabled                                 4gbps

sys/switch-B/slot-1/switch-fc/port-31   fabric/san/B/phys-slot-1-port-31        fc                                      enabled                                 4gbps

sys/switch-B/slot-1/switch-fc/port-32   fabric/san/B/phys-slot-1-port-32        fc                                      enabled                                 4gbps

If you weren't aware, there is a great command called get-ucscmdletmeta.  It will help in understanding how things are defined in the UCS XML model.

Here are some example usages:

Get-UcsCmdletMeta -noun ucsnetworkelement -Tree

(I've removed the output since it was very long, but it will give you all the hierarchy of all the sub classes that are children to network element, the XML class names for each, and the appropriate PowerShell verbs and nouns for querying and manipulating the classes.

PS C:\ucs> Get-UcsCmdletMeta -noun ucsfifcport

ClassId                   : FcPIo

Noun                      : UcsFiFcPort

Verb                      : Get

PipelineClassId           : {PortGroup}

LimitScopePipelineClassId : {}

MoMeta                    : Cisco.Ucs.UcsMoMeta

----This output shows the cmdlets available for getting information about a FC Port.  You can see the PipelineClassID shows PortGroup, which signifies the classes / PoSh nouns that are pipelineable into this class

PS C:\ucs> Get-UcsCmdletMeta -noun ucsfifcport | select -ExpandProperty mometa

ClassId         : FcPIo

XmlTag          : fcPIo

Rn              : port-[PortId]

MinVersion      : 1.0(1e)

Access          : InputOutput

ChildClassId    : {EquipmentXcvr, EventInst, FaultInst, FcErrStats...}

AccessPrivilege : {read-only}

PropertyMeta    : {AdminState, AdminTransport, ChassisId, Dn...}

----- Here you can see the Managed Object (MO) meta data about the FC Port class.  You can see it was added in UCSM 1.0(1e), and needs only the "Read-Only" Privelege to view it.

PS C:\ucs> Get-UcsCmdletMeta -noun ucsfifcport | select -ExpandProperty mometa | select -ExpandProperty propertymeta | ft -AutoSize

Restriction                      Name           XmlAttribute   Type            MinVersion    Access

-----------                      ----           ------------   ----            ----------    ------

Cisco.Ucs.UcsPropertyRestriction AdminState     adminState     System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction AdminTransport adminTransport System.String   2.0(1m)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction ChassisId      chassisId      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Dn             dn             System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Encap          encap          System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction EpDn           epDn           System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction IfRole         ifRole         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction IfType         ifType         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Lc             lc             System.String   2.0(1m)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction LicGP          licGP          System.UInt64   1.4(1i)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction LicState       licState       System.String   1.4(1i)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Locale         locale         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Mode           mode           System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Model          model          System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Name           name           System.String   1.0(1e)    ReadWrite

Cisco.Ucs.UcsPropertyRestriction OperSpeed      operSpeed      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction OperState      operState      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerChassisId  peerChassisId  System.String   1.4(1i)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerDn         peerDn         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerPortId     peerPortId     System.UInt32   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PeerSlotId     peerSlotId     System.UInt32   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction PortId         portId         System.UInt32   1.0(1e)       Naming

Cisco.Ucs.UcsPropertyRestriction Revision       revision       System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Rn             rn             System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Serial         serial         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction SlotId         slotId         System.UInt32   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction StateQual      stateQual      System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Status         status         System.String   1.0(1e)    ReadWrite

Cisco.Ucs.UcsPropertyRestriction SwitchId       switchId       System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Transport      transport      System.String[] 1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Ts             ts             System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Type           type           System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction UnifiedPort    unifiedPort    System.String   2.0(1m)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction UsrLbl         usrLbl         System.String   1.4(1i)    ReadWrite

Cisco.Ucs.UcsPropertyRestriction Vendor         vendor         System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction Wwn            wwn            System.String   1.0(1e)     ReadOnly

Cisco.Ucs.UcsPropertyRestriction XcvrType       xcvrType       System.String   1.4(1i)     ReadOnly

---In this example I'm showing all of the properties for the FC Port class.  As you can see OperSpeed is the property you are most concerned about.

Let me know if you have futher questions!!

Thanks,
Eric     

Eric.. thanks for your reply.. I took a subset of your command

Get-UcsNetworkElement | Get-UcsFiModule -Id 1 | Get-UcsPortGroup -Transport fc | Get-UcsFiFcPort | select dn, epdn, admintransport, adminstate, operspeed | Format-Table

and used this to obtain the operational speed of my FC Links.

Get-UcsFiFcPort -Ucs $kvlogin -AdminState "enabled" -SwitchId "B" -PortId $FabBFCLink | Foreach-Object { $_.OperSpeed }

Great stuff .. thx.

Review Cisco Networking products for a $25 gift card