Add lightning scripts

This commit is contained in:
Quentin 2019-10-16 17:17:41 +02:00
parent 6170ed7dab
commit 18a5008386
3 changed files with 30 additions and 1 deletions

View file

@ -10,7 +10,7 @@ ggplot(data=link_info, aes(x=timestamp, y=link, color=speed)) +
theme_classic()
xx <- read.csv("../res/tmp_light/k.csv")
xx <- read.csv("../res/tmp_light/o.csv")
xx2 <- sqldf("select packet_id,1.0 * MIN(latency) / 1000.0 as lat,way from xx group by packet_id,way")
ggplot(data=xx2, aes(x=packet_id, y=lat, color=way)) +
geom_line() +

15
scripts/lightning-client Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
mkdir -p $6/{log,shared,res}
donar \
-a lightning \
-c \
-o $6/shared/onion_services.pub \
-l $4 \
-p $5 \
-b \
-r 9000 \
> $6/log/client-donar-stdout.log 2> $6/log/client-donar-stderr.log &
sleep 2
measlat -h 127.13.3.7 -p 9000 -r > /dev/null 2>&1 # Used to wait for connections
measlat -h 127.13.3.7 -p 9000 -c $1 -i $2 -s $3 > $6/log/client-measlat-stdout.log 2> $6/log/client-measlat-stderr.log

14
scripts/lightning-server Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
mkdir -p $6/{log,shared}
cd $6/shared
donar \
-a lightning \
-s \
-l $1 \
-p $2 \
-b \
-e 9000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
measlat -h 127.0.0.1 -p 9000 -l -c $3 -i $4 -s $5 > ../log/server-measlat-stdout.log 2> ../log/server-measlat-stderr.log