This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = function() | |
wrk.connect(wrk.thread.addr) | |
return wrk.format() | |
end |
https://github.com/nodesource/distributions/blob/master/README.md
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
apt install -t buster nodejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LLVM_PREFIX ?= /usr/bin | |
CLANG ?= $(LLVM_PREFIX)/clang | |
LLC ?= $(LLVM_PREFIX)/llc | |
INCLUDEFLAGS = -I/usr/include | |
all: xdp_prog.elf | |
clean: | |
-$(RM) *.elf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hex=$1 # hex stream of packet like 0abcdef... | |
out=$2 # output file name | |
echo "$1" | xxd -r -p - - | od -Ax -tx1 - | text2pcap - $2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get -t stretch-backports install -y linux-image-amd64 linux-headers-amd64 | |
apt-get -t stretch-backports install -y debhelper cmake libllvm6.0 llvm-6.0-dev libclang-6.0-dev \ | |
libelf-dev bison flex libedit-dev clang-format-6.0 python python-netaddr \ | |
python-pyroute2 luajit libluajit-5.1-dev arping iperf netperf ethtool \ | |
devscripts zlib1g-dev libfl-dev | |
git clone https://github.com/iovisor/bcc.git | |
pushd bcc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -f $1 ]; then | |
exit 1 | |
fi | |
kbuilddir=/usr/src/linux-source-4.17 | |
NOSTDINC_FLAGS="-nostdinc -isystem $(gcc -print-file-name=include)" | |
clang -S $NOSTDINC_FLAGS \ |
- Use go 1.10+
- Install packages
sudo apt install libbpfcc libbpfcc-dev bpfcc-tools
- go get gobpf
sudo apt install libnl-3-dev libnl-genl-3-dev libnl-nf-3-dev
git clone https://github.com/socketpair/nltrace.git
cd nltrace
make
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net" | |
"github.com/vishvananda/netlink" | |
) | |
func main() { |