-
Notifications
You must be signed in to change notification settings - Fork 48
/
important_commands.txt
37 lines (28 loc) · 1.45 KB
/
important_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// docker command to test delay between to containers
docker run -it --cap-add=NET_ADMIN ubuntu /bin/bash
apt-get update; apt-get -y install iputils-ping; apt-get -y install net-tools; apt-get -y install iproute
// tc command to simulate network delay
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: prio bands 2 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport 240.0.0.2 flowid 1:2
tc qdisc add dev eth0 parent 1:1 handle 10: netem delay 0ms
tc qdisc add dev eth0 parent 1:2 handle 20: netem delay 1000ms
// bash command to run simulation multiple times
array=(0.5 1); for i in "${array[@]}"; do python3 main.py --tick-duration $i; done
// rsync command to sync files on server
rsync --dry-run --delete -r --verbose -e="ssh -p 2222" --filter=':- .gitignore' --exclude=data --exclude='.git*' ./ simon@128.131.169.35:simcoin
// ssh command with port forwarding of cockpit
ssh -p 2222 -L 9099:localhost:9090 simon@128.131.169.35
// google perfomance tool
https://wiki.geany.org/howtos/profiling/gperftools
google-pprof ../patched_bitcoin_client_cpp/src/bitcoind ~/Desktop/bitcoin-1.prof
// check kernel messages
dmesg -w
// increase arp cache
sudo sysctl -w net.ipv4.neigh.default.gc_thresh1=16384
sudo sysctl -w net.ipv4.neigh.default.gc_thresh2=32768
sudo sysctl -w net.ipv4.neigh.default.gc_thresh3=65536
// check arp cache length
watch -n3 "arp -n | wc -l"
// check sockets
watch -n5 ss -s -a -t