Cisco mds nx-os / san-os tips, tricks and one-liners

 

list f_ports on a linecard that are up - display connected device pwwns and device alias, if any

(note: this worked up to nx-os 4.2(1a) but has changed... will update shortly)

 

# sh int br | sed -r -n s/(fc2\/[0-9]+).*up.*/\1/p | sed -r -n "s/(.*)/sh flog data interf &/p" | vsh | no-more

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

INTERFACE        VSAN    FCID           PORT NAME               NODE NAME

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

fc2/2            105   0xcb0027  50:06:04:82:d5:31:a0:86 50:06:04:82:d5:31:a0:86

                           [e05218f7aa]

 

Total number of flogi = 1.

 

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

INTERFACE        VSAN    FCID           PORT NAME               NODE NAME

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

fc2/4            105   0xcb0009  50:06:0e:80:04:2a:72:66 50:06:0e:80:04:2a:72:66

                           [h10866cl7g]

 

Total number of flogi = 1.