From eb8f608da4eb1f8014a444dc0bdacd1e1c04355a Mon Sep 17 00:00:00 2001 From: charliebarber Date: Sat, 6 Apr 2024 15:18:19 +0100 Subject: [PATCH 1/2] Spelling mistake causing one file not to generate pcaps --- entrypoint.sh | 2 +- run_ns3.sh | 8 ++++---- src/combined-frr.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9c20daac..0112513c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,7 @@ rm -rf traces/ mkdir traces cp user_src/* scratch/ -export NS_LOG=FRRQueue=level_all +# export NS_LOG=FRRQueue=level_all cp ./run_ns3.sh ./. diff --git a/run_ns3.sh b/run_ns3.sh index 35aafbe7..67d23ca9 100755 --- a/run_ns3.sh +++ b/run_ns3.sh @@ -12,10 +12,10 @@ run_experiment() { mkdir -p "$dir/baseline-udp/" mkdir -p "$dir/baseline-no-udp/" - ./ns3 run "scratch/combined-frr.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/frr/" - ./ns3 run "scratch/combined-frr-no-udp.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/frr-no-udp/" - ./ns3 run "scratch/combined-baseline-udp.cc --$test_vaiable=$test_value --policy_threshold=$policy_threshold --dir=$dir/baseline-udp/" - ./ns3 run "scratch/combined-baseline-no-udp.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/baseline-no-udp/" + NS_LOG="" ./ns3 run "scratch/combined-frr.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/frr/" + NS_LOG="" ./ns3 run "scratch/combined-frr-no-udp.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/frr-no-udp/" + NS_LOG="" ./ns3 run "scratch/combined-baseline-udp.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/baseline-udp/" + NS_LOG="" ./ns3 run "scratch/combined-baseline-no-udp.cc --$test_variable=$test_value --policy_threshold=$policy_threshold --dir=$dir/baseline-no-udp/" } # Delay primary experiments diff --git a/src/combined-frr.cc b/src/combined-frr.cc index 71f81915..e74b2ac1 100644 --- a/src/combined-frr.cc +++ b/src/combined-frr.cc @@ -122,7 +122,7 @@ int main(int argc, char* argv[]) BasicCongestionPolicy::usage_percentage = cong_threshold; // LogComponentEnable("FRRQueue", LOG_LEVEL_ERROR); - // LogComponentEnableAll(LOG_LEVEL_ERROR); + LogComponentEnableAll(LOG_LEVEL_ERROR); /* * +----------+ +-----------+ * |Congestion| | Traffic | From 8af17d9bad8fe06f497928c565b5b00947524519 Mon Sep 17 00:00:00 2001 From: charliebarber Date: Sat, 6 Apr 2024 15:35:45 +0100 Subject: [PATCH 2/2] Changed docker to not require argument, removed most logs/all from NS3 --- entrypoint.sh | 6 +++--- src/combined-baseline-no-udp.cc | 5 ++--- src/combined-baseline-udp.cc | 6 ++---- src/combined-frr-no-udp.cc | 4 ++-- src/combined-frr.cc | 1 - 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 0112513c..9abfeea1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,9 +15,9 @@ if [ $? -ne 0 ]; then exit 1 fi -if [ -z "$1" ]; then - exit 0 -fi +# if [ -z "$1" ]; then +# exit 0 +# fi # ./ns3 run 'scratch/combined-frr.cc --delay_bottleneck=1ms' ./run_ns3.sh diff --git a/src/combined-baseline-no-udp.cc b/src/combined-baseline-no-udp.cc index 0cc4a104..1ca4b3f6 100644 --- a/src/combined-baseline-no-udp.cc +++ b/src/combined-baseline-no-udp.cc @@ -144,11 +144,10 @@ int main(int argc, char* argv[]) cmd.AddValue("dir", "Traces directory", dir); cmd.Parse(argc, argv); - std::cout << "Congestion policy threshold: " << cong_threshold << std::endl; BasicCongestionPolicy::usage_percentage = cong_threshold; - // LogComponentEnable("FRRQueue", LOG_LEVEL_ERROR); - // LogComponentEnableAll(LOG_LEVEL_ERROR); + // LogComponentEnable("FRRQueue", LOG_LEVEL_LOGIC); + LogComponentEnableAll(LOG_LEVEL_ERROR); /* * +----------+ +-----------+ * |Congestion| | Traffic | diff --git a/src/combined-baseline-udp.cc b/src/combined-baseline-udp.cc index 2a73bf49..1d9ee631 100644 --- a/src/combined-baseline-udp.cc +++ b/src/combined-baseline-udp.cc @@ -143,12 +143,10 @@ int main(int argc, char* argv[]) cmd.AddValue("dir", "Traces directory", dir); cmd.Parse(argc, argv); - std::cout << "Congestion policy threshold: " << cong_threshold << std::endl; BasicCongestionPolicy::usage_percentage = cong_threshold; - // LogComponentEnable("FRRQueue", LOG_LEVEL_ERROR); - // LogComponentEnableAll(LOG_LEVEL_ERROR); - + // LogComponentEnable("FRRQueue", LOG_LEVEL_LOGIC); + LogComponentEnableAll(LOG_LEVEL_ERROR); /* * +----------+ +-----------+ * |Congestion| | Traffic | diff --git a/src/combined-frr-no-udp.cc b/src/combined-frr-no-udp.cc index 476b7e6e..173d2e44 100644 --- a/src/combined-frr-no-udp.cc +++ b/src/combined-frr-no-udp.cc @@ -143,10 +143,10 @@ int main(int argc, char* argv[]) cmd.AddValue("dir", "Traces directory", dir); cmd.Parse(argc, argv); - std::cout << "Congestion policy threshold: " << cong_threshold << std::endl; BasicCongestionPolicy::usage_percentage = cong_threshold; - LogComponentEnable("FRRQueue", LOG_LEVEL_LOGIC); + // LogComponentEnable("FRRQueue", LOG_LEVEL_LOGIC); + LogComponentEnableAll(LOG_LEVEL_ERROR); /* * +----------+ +-----------+ * |Congestion| | Traffic | diff --git a/src/combined-frr.cc b/src/combined-frr.cc index e74b2ac1..74009ba4 100644 --- a/src/combined-frr.cc +++ b/src/combined-frr.cc @@ -118,7 +118,6 @@ int main(int argc, char* argv[]) cmd.AddValue("dir", "Traces directory", dir); cmd.Parse(argc, argv); - std::cout << "Congestion policy threshold: " << cong_threshold << std::endl; BasicCongestionPolicy::usage_percentage = cong_threshold; // LogComponentEnable("FRRQueue", LOG_LEVEL_ERROR);