Skip to content

Instantly share code, notes, and snippets.

@dotysan
Created June 30, 2015 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotysan/eeb1c2e6142060f87953 to your computer and use it in GitHub Desktop.
Save dotysan/eeb1c2e6142060f87953 to your computer and use it in GitHub Desktop.
snippet to lean LACP members
# also fill an array with port-channel members so we can exclude them
set LACP [list]
if {$showLACP =="" && $tcl_platform(machine) =="Switch"} {
foreach word [split [exec "show etherc summ | begin ^\[0-9]"]] {
if [string is integer -strict $word] {
set portchannel $word
}
if [regexp {(.*)\(P\)$} $word -> lacp] {
lappend LACP $lacp
} } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment