From 5b9a1414a2858181970423bd81b0afc2b6057a6e Mon Sep 17 00:00:00 2001 From: Aryan Singh Date: Sun, 27 Sep 2026 23:03:17 -0500 Subject: [PATCH 1/2] more logging lol MP1 init --- MP2/peer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MP2/peer.py b/MP2/peer.py index 99d6b8b..ee73d52 100644 --- a/MP2/peer.py +++ b/MP2/peer.py @@ -15,13 +15,19 @@ def _machine_index(): return None log_file = open(f"machine.{_machine_index()}.log", "w") +log_file_mp1 = open(f"/home/asing271/fa26_cs425_.group-mp_.team-01/MP1/machine.{_machine_index()}.log","w") + log_lock = threading.Lock() def log(message): timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3] with log_lock: + print(f"[{timestamp}] {message}") log_file.write(f"[{timestamp}] {message}\n") log_file.flush() + log_file_mp1.write(f"[{timestamp}] {message}\n") + log_file_mp1.flush() + def utc_time(): return datetime.now(timezone.utc).timestamp() From fc3801e2afdd6339b7a58e128379b71e8f3c65b3 Mon Sep 17 00:00:00 2001 From: Aryan Singh Date: Sun, 27 Sep 2026 23:05:31 -0500 Subject: [PATCH 2/2] Update run_mp.sh --- MP1/scripts/run_mp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP1/scripts/run_mp.sh b/MP1/scripts/run_mp.sh index 1f9f558..9bae152 100755 --- a/MP1/scripts/run_mp.sh +++ b/MP1/scripts/run_mp.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -CMD='cd fa26_cs425_.group-mp_.team-01/MP1 && nohup python3 server.py /dev/null 2>&1 &' +CMD='cd /home/asing271/fa26_cs425_.group-mp_.team-01/MP1 && nohup python3 server.py /dev/null 2>&1 &' if [[ "$#" -eq 0 ]]; then echo "Need at least one server number as an argument."