-
Notifications
You must be signed in to change notification settings - Fork 1
Examples
Daniel Duclos-Cavalcanti edited this page Sep 20, 2024
·
14 revisions
- Clone repo with Submodule
git clone --recursive https://github.com/duclos-cavalcanti/msc-thesis.git
# recursive flag needed to include submodule- Update submodule
git add jasper
git commit -m "Updated submodule"
git push origin main- Create Template
git checkout uab
cd gcp-deploy
python3 run.py create-template -r 10 -p 3 -b 2 -c 1 -rm socket -dm standard -conf 0
- Deploy Stack
git checkout uab
cd gcp-deploy
python3 ./run.py deploy-stack- Deploy Stack
git checkout uab
cd gcp-deploy
python3 ./run.py delete-stack-
Client Program
-
cdinto the correct directory
sudo su cd /home/uab2005/dom-tenant-service/src-
MACcollection
./build/multicast_client -a mac -t 10 -i 0 -s test- Run experiment
./build/multicast_client -a messages -t 10 -i 0 -s test -
-
Proxy/Recipient Program
sudo su
cd /home/uab2005/dom-tenant-service/src
./build/multicast_<proxy/receiver> 0 1 dpdk 2 0 3 gcp- Startup Logging
- GCP:
sudo journalctl -f -u google-startup-scripts.service`
# sudo systemctl restart google-startup-scripts.service
- AWS:
tail -f /var/log/cloud-init-output.log`
- Option:
ncandping
# 1. ssh into node 1
# 2. ping <ip address of node 2> # 192.168.1.2
ping 192.168.1.2
# ---------------
# 1. ssh into node 2
# 2. Using `nc` to listen on a specific port and ip: nc -l -p <port> -s <ip>
nc -l -p <port>- Option:
nc
# 1. ssh into node 1
# 2. establish connection to node 2: 192.168.1.2
nc <IP address> <port>
# ---------------
# 1. ssh into node 2
# 2. Using `nc` to listen on a specific port and ip: nc -l -p <port> -s <ip>
nc -l -p <port>
# Anything you type on either side will be seem on the other node, if
# the connection is successful.
# For UDP, simply pass the -u option to netcat (nc)- Option:
ncandtcpdump
# 1. ssh into node 1
# 2. establish connection to node 2: 192.168.1.2
nc <IP address> <port>
# Write stuff
# ---------------
# 1. ssh into node 2
# 2. Using `tcpdump`: tcpdump <udp> port <port>
tcpdump port <port>- Option
telnet
telnet <ip> <port>tc disc
# 100ms delay:
sudo tc qdisc add dev eth0 root netem delay 100ms
# adds delay with variation (e.g., 100ms ± 20ms)
sudo tc qdisc add dev eth0 root netem delay 100ms 20ms
# adds delay with correlation (e.g., 100ms ± 20ms with 25% correlation)
sudo tc qdisc add dev eth0 root netem delay 100ms 20ms 25%
# packet loss
sudo tc qdisc add dev eth0 root netem loss 1%
# packet duplication
sudo tc qdisc add dev eth0 root netem duplicate 1%
# packet corruption
sudo tc qdisc add dev eth0 root netem corrupt 1%
-
netstat: Can be used to evaluate if a given port is being used and by which process.
- Examples:
- (i)
sudo netstat -tulpn- (ii)
sudo netstat -tulpn | grep :34260 # grepping for a specific port
-
lsof: Lists open file descriptors, useful after getting apidfromnetstatto evaluate what a process is doing with it's given file descriptors.
lsof -i "$pid"
lsof -p "$pid"-
ss: Very similar to netcat.
sudo ss -ltnp | grep ':8080'- Retrieve IP addresses of docker instances:
docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)Output:
/receiver - 172.17.0.5
/sender - 172.17.0.6
/manager - 172.17.0.4
/web-serve-blog - 172.17.0.2
/dpdk-dev - 172.17.0.3- Remove danlging images
docker images -qf "dangling=true" | xargs docker rmiAuthors: Daniel Duclos-Cavalcanti