From 546f83cc05d41aed091e8895e42f75f0295ff87d Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sat, 4 Jun 2016 19:36:37 +0200 Subject: tools: redo discovery in the form of lolwhat what? lol... just figure it out for me. Ok, so the tool isn't entirely done, but it departs from the simple lldpdiscver.pl method that was very limited when things weren't working as they should. The long-term idea of lolwhat is that it should be able to do all sorts of discovery. Right now it just takes a list of IPs and figures out how things are connected by SNMP. It uses LLDP info from SNMP, but it does not _currently_ traverse new hosts based on what it finds. --- extras/tools/lldp/dotnet.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'extras/tools/lldp/dotnet.sh') diff --git a/extras/tools/lldp/dotnet.sh b/extras/tools/lldp/dotnet.sh index 5c1b369..40e5024 100755 --- a/extras/tools/lldp/dotnet.sh +++ b/extras/tools/lldp/dotnet.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash - -DATE="$(date +%s)" -if [ -z "$1" ] || [ -z "$2" ]; then - echo "Usage: $0 " - exit 1; -fi -./lldpdiscover.pl $1 $2 | ./draw-neighbors.pl | dot -Tpng > dotnet-${DATE}.png -echo File name: dotnet-${DATE}.png +set -xe +DATE="$(date --iso-8601=second | sed s/:/./g)" +JSON=lolwhat-${DATE}.json +./lolwhat.pl $* > ${JSON} +./draw-neighbors.pl < ${JSON} | dot -Tpng > lolwhat-${DATE}.png +./draw-neighbors.pl full < ${JSON} | dot -Tpng > lolwhat-${DATE}-full.png +echo File name: lolwhat-${DATE}*png -- cgit v1.2.3