From 7693e79d5da552f4c960e8c1043cde642a64d774 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 17 Aug 2022 10:27:30 +0200 Subject: [PATCH] show root on mikrotik, update bridge 0 monitor --- spanning-tree-check.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spanning-tree-check.sh b/spanning-tree-check.sh index 1417940..8c6ca41 100755 --- a/spanning-tree-check.sh +++ b/spanning-tree-check.sh @@ -3,8 +3,13 @@ # check for files older than day find log -name '*active*' -ctime +1 | cut -d_ -f2 | while read sw ; do + echo "# /dell-switch.pl $sw 'show spanning-tree active'" ./dell-switch.pl $sw 'show spanning-tree active' - echo -n '.' +done + +find ../mikrotik-switch/out -name '*bridge monitor 0 once' -ctime +1 | cut -d/ -f4 | cut -d. -f1 | while read sw ; do + echo "# ../mikrotik-switch/m-ssh-out $sw 'interface bridge monitor 0 once'" + ../mikrotik-switch/m-ssh-out $sw 'interface bridge monitor 0 once' done ( @@ -13,6 +18,7 @@ done echo "# active roots" git -C out grep -B 2 root '*active*' +git -C out grep -C 1 'root-bridge: yes' echo "# root bridge" ( -- 2.20.1