projects
/
dell-switch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d72fcd7
)
create /dev/shm/dead with list of switches with no ping
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 12 Jul 2019 08:05:13 +0000
(10:05 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 12 Jul 2019 08:05:13 +0000
(10:05 +0200)
snmp-mac-port
patch
|
blob
|
history
diff --git
a/snmp-mac-port
b/snmp-mac-port
index
8143d67
..
8ddf043
100755
(executable)
--- a/
snmp-mac-port
+++ b/
snmp-mac-port
@@
-7,7
+7,10
@@
test -d $log || mkdir $log
snmp_walk() {
ip=$1
- fping $ip 2>>/dev/shm/dead
+ if ! fping $ip 2>>/dev/shm/dead ; then
+ echo "ERROR: $ip"
+ return
+ fi
# Q-BRIDGE-MIB dot1qFdbTable
#snmpbulkwalk -O0sUX -v2c -Cc -c $COMMUNITY $ip 1.3.6.1.2.1.17.7.1.2.2.1.2 | sed -e 's/.*7\.1\.2\.2\.[0-9]\.[0-9]\.//' -e 's/ = [^:]*: / /' -e 's/\./ /g' | awk -v name=$ip '{ printf "%s %d %02x:%02x:%02x:%02x:%02x:%02x %d\n", name, $1, $2,$3,$4,$5,$6,$7, $8 }' | tee $log/$ip