Skip to content

Commit

Permalink
Added the identify.c tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdstrowes committed May 9, 2011
1 parent 9e5d18f commit c1e503d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bgpaggregatelinks.sh
Expand Up @@ -28,7 +28,7 @@
# POSSIBILITY OF SUCH DAMAGE.


classpath=~/build/
classpath=/home/sds/src/target/scala_2.8.0-local/classes/

while getopts "i:o:d:" flag
do
Expand Down
2 changes: 1 addition & 1 deletion bgppathstolinks.sh
Expand Up @@ -28,7 +28,7 @@
# POSSIBILITY OF SUCH DAMAGE.


classpath=~/build/
classpath=/home/sds/src/target/scala_2.8.0-local/classes/

while getopts "i:o:" flag
do
Expand Down
17 changes: 9 additions & 8 deletions bgppp.sh
Expand Up @@ -33,8 +33,9 @@
# - extract all AS pairs in the path data to construct links
# - aggregate links together to create a complete map


classpath=~/build/
path=/home/sds/release/bgp\ scripts/
PATH=$PATH:$path
classpath=/home/sds/src/target/scala_2.8.0-local/classes/

while getopts "b:p:l:o:d:" flag
do
Expand All @@ -60,7 +61,7 @@ then
exit
fi

./bgpwget.sh -o $bgp_data_dir -d $date_string
bgpwget.sh -o $bgp_data_dir -d $date_string

source bgprepos.sh

Expand All @@ -85,7 +86,7 @@ do

echo "Converting BGP $f to $outdir/`basename $f .bz2`.paths.bz2"

./bgptouniqpaths.sh -i $f -o $outdir/`basename $f .bz2`.paths.bz2
bgptouniqpaths.sh -i $f -o $outdir/`basename $f .bz2`.paths.bz2
done
done
for r in `echo $cisco_repos | sed 's$http://$$g'`
Expand All @@ -109,7 +110,7 @@ do
do
echo "Converting BGP $f to $outdir/`basename $f .bz2`.paths.bz2"

./bgptouniqpaths.sh -i $f -o $outdir/`basename $f .bz2`.paths.bz2 -c
bgptouniqpaths.sh -i $f -o $outdir/`basename $f .bz2`.paths.bz2 -c
done
fi
done
Expand All @@ -129,7 +130,7 @@ do
do
out=$links_data_dir/`basename $f | sed s/paths/links/g`
mkdir -p `dirname $out`
./bgppathstolinks.sh -i $f -o $out
bgppathstolinks.sh -i $f -o $out
done
fi
done
Expand All @@ -146,15 +147,15 @@ do
do
out=$links_data_dir/`basename $f | sed s/paths/links/g`
mkdir -p `dirname $out`
./bgppathstolinks.sh -i $f -o $out
bgppathstolinks.sh -i $f -o $out
done
fi
done

if [ $aggregate_links_dir ]
then
echo "-- Aggregating."
./bgpaggregatelinks.sh -i /mnt/ext/sds/links -o /mnt/ext/sds/bgp-links-aggregated -d $date_string
bgpaggregatelinks.sh -i /mnt/ext/sds/links -o /mnt/ext/sds/bgp-links-aggregated -d $date_string
fi

echo "-- Done."
6 changes: 3 additions & 3 deletions bgptouniqpaths.sh
Expand Up @@ -27,8 +27,8 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.


classpath=~/build/
path=/home/sds/release/bgp\ scripts/
classpath=/home/sds/src/target/scala_2.8.0-local/classes/

while getopts "i:o:c" flag
do
Expand All @@ -53,7 +53,7 @@ mkdir -p `dirname $output`
bzcat $input |
if [ $clean ]
then
awk -f bgp-clean-cisco-table.awk |
awk -f "$path/bgp-clean-cisco-table.awk" |
cut -d " " -f2-
else
bgpdump -m - |
Expand Down
3 changes: 3 additions & 0 deletions bgpwget.sh
Expand Up @@ -66,6 +66,9 @@ do

wget --quiet -O /tmp/index.tmp.html $r/$year.$month/RIBS/

ls -l /tmp/index.tmp.html
egrep -o "rib.$year$month$day.[0-9]{4}.bz2" /tmp/index.tmp.html | sort -k1,1 | uniq

all_files=`egrep -o "rib.$year$month$day.[0-9]{4}.bz2" /tmp/index.tmp.html | sort -k1,1 | uniq`
file=`echo $all_files | sed 's/ /\n/g' | head -n1`

Expand Down

0 comments on commit c1e503d

Please sign in to comment.