#!/usr/bin/env bash

calc() { awk "BEGIN{print $*}"; }

# GENERAL SETTINGS
# 97500 (65 packets) or 30000 (20 packets)
ecn_threshold=30000
num_flows=112000
intermediary=uniform
FLOWLET_GAP_NS=50000
k_for_k_shortest_paths=8
hybrid_threshold_bytes=100000

# RUNS

flows_per_s=2000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

flows_per_s=4000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

flows_per_s=6000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

flows_per_s=8000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

flows_per_s=10000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

flows_per_s=12000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
#ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

flows_per_s=14000
runtime=`calc ${num_flows} / ${flows_per_s}`;

echo "Starting deployment... "

ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16.properties run_folder_name=10_projector/full_fat_tree_k16_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb.properties run_folder_name=10_projector/xpander_n128_d16_vlb_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/full_fat_tree_k16_with_servers.properties run_folder_name=10_projector/full_fat_tree_k16_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_vlb_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_vlb_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ecmp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ecmp_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} routing_ecmp_then_valiant_switch_threshold_bytes=${hybrid_threshold_bytes}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths}"
ssh user@machine.com "cd /path/to/folder/netbench; screen -d -m ../java/jre1.8.0_131/bin/java -ea -jar NetBench.jar private/runs/10_projector/xpander_n128_d16_hybrid_ksp_with_servers.properties run_folder_name=10_projector/xpander_n128_d16_hybrid_ksp_${k_for_k_shortest_paths}_with_servers_flows_${flows_per_s}_runtime_${runtime}s_ecn_threshold_${ecn_threshold}_intermediary_${intermediary}_flowlet_gap_${FLOWLET_GAP_NS} output_port_ecn_threshold_k_bytes=${ecn_threshold} traffic_lambda_flow_starts_per_s=${flows_per_s} run_time_s=${runtime} network_device_intermediary=${intermediary} FLOWLET_GAP_NS=${FLOWLET_GAP_NS} k_for_k_shortest_paths=${k_for_k_shortest_paths} routing_ecmp_then_source_routing_switch_threshold_bytes=${hybrid_threshold_bytes}"

echo "ProjecToR deployment (${flows_per_s}) finished."

