Skip to content
Snippets Groups Projects
Commit 4d6fac25 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

update port server

parent 231c3573
Branches
Tags
No related merge requests found
......@@ -320,14 +320,14 @@ def generate_topohub_GNS3_topology():
time.sleep(1)
GNS3Manager.start_node(host.id)
# TCP listen on port 12345 to collect propagation time data
command = "nc -l -p 12345 > measurement.txt"
# TCP listen on port 12348 to collect propagation time data
command = "nc -l -p 12348 > measurement.txt"
try:
subprocess.run(command, shell=True, check=True)
print("Command executed successfully.")
GNS3Manager.nocapture() # Stop capturing packets after receiving data
# Store data in a .zip
subprocess.run("zip a.zip ~/GNS3/projects/" + project_name.replace(".gns3", "") + "/project-files/captures/*", shell=True, check=True)
subprocess.run("zip a.zip /mnt/raid5/projects/" + PROJECT_ID + "/project-files/captures/*", shell=True, check=True)
except subprocess.CalledProcessError as e:
print(f"Error executing command: {e}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment