Permalink
Browse files

added data download to trace script

  • Loading branch information...
szarski committed Dec 13, 2011
1 parent 0cfb791 commit 7bef49963cda6ec999d97707860611448bd2e018
Showing with 5 additions and 0 deletions.
  1. +5 −0 trace.sh
View
@@ -1,13 +1,15 @@
COMMAND=`(hash traceroute 2>&- && echo 'traceroute') || echo 'tracepath'`
DNS_COMMAND='dig'
DUMP_COMMAND='sudo tcpdump -i eth0 -w'
+DATA_COMMAND='wget'
OUTPUT_DIR='output'
TIMESTAMP=`date +%s`
RESOURCES=`cat config/resources.txt`
mkdir -p $OUTPUT_DIR'/dumps'
mkdir -p $OUTPUT_DIR'/traces'
mkdir -p $OUTPUT_DIR'/dns'
+mkdir -p $OUTPUT_DIR'/data'
for RESOURCE in $RESOURCES; do
DUMP_FILENAME=`echo $OUTPUT_DIR'/dumps/'$TIMESTAMP'_'$RESOURCE`
@@ -19,5 +21,8 @@ for RESOURCE in $RESOURCES; do
DNS_FILENAME=`echo $OUTPUT_DIR'/dns/'$TIMESTAMP'_'$RESOURCE`
$DNS_COMMAND $RESOURCE > $DNS_FILENAME
+ DATA_FILENAME=`echo $OUTPUT_DIR'/data/'$TIMESTAMP'_'$RESOURCE`
+ $DATA_COMMAND $RESOURCE > $DATA_FILENAME
+
sudo killall tcpdump
done

0 comments on commit 7bef499

Please sign in to comment.