Benchmark with apache benchmark tool
1
ab -n 99999 -c 1000 http://127.0.0.1:9687/
Port channels & scan
1
2
3
cat > /dev/tcp/localhost/1234
cat < /dev/tcp/localhost/1234 | grep 1234
nc -vzt host port
Trace a process
1
2
3
4
5
6
7
8
9
10
sudo strace -t -p 13262 -f -e trace=network -s 10000

strace -t -e trace=open,close,read,write df
sudo ltrace -t -p 13262

sudo strace -t $(pidof "nginx" | sed 's/\([0-9]*\)/-p \1/g') -f -e trace=network,open,close,read,write -s 10000

function straceall {
strace $(pidof "${1}" | sed 's/\([0-9]*\)/-p \1/g')
}
Trace a network log
1
ngrep -qt 'REGEX ' 'port 80'