@ -126,9 +126,12 @@ func dictateNode(addr string, command string) int {
// read response
buff := make([]byte, 1024)
n, _ := conn.Read(buff)
if n, err := conn.Read(buff); err == nil {
log.Printf("Receive from %s: %s", addr, buff[:n])
return 1
} else {
return 0
}
func handleUploadRequest(w http.ResponseWriter, r *http.Request) {
@ -150,7 +150,7 @@ func handleInitCommand(args []string, w *bufio.Writer) {
func handleKillCommand(w *bufio.Writer) {
log.Println("Kill command")
runCmd("../kill_node.sh")
runCmd("./kill_node.sh")
logAndReply(w, "Kill command done.")
@ -5,10 +5,12 @@ curl http://unique-bucket-bin.s3.amazonaws.com/txgen -o txgen
curl http://unique-bucket-bin.s3.amazonaws.com/soldier -o soldier
curl http://unique-bucket-bin.s3.amazonaws.com/commander -o commander
curl http://unique-bucket-bin.s3.amazonaws.com/benchmark -o benchmark
curl http://unique-bucket-bin.s3.amazonaws.com/kill_node.sh -o kill_node.sh
chmod +x ./soldier
chmod +x ./txgen
chmod +x ./benchmark
chmod +x ./commander
chmod +x ./kill_node.sh
# Get My IP
ip=`curl http://169.254.169.254/latest/meta-data/public-ipv4`