Last active
June 9, 2022 19:41
-
-
Save paranlee/540e5c03c5e2d72d08638f5cac89fc5f to your computer and use it in GitHub Desktop.
Computer System Monotoring Evironmental based on eBPF.
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
# bcc | |
sudo yum install -y epel-release | |
sudo yum update -y | |
sudo yum groupinstall -y "Development tools" | |
sudo yum install -y elfutils-libelf-devel git bison flex ncurses-devel | |
sudo yum install -y luajit luajit-devel # for Lua support | |
sudo yum install -y python3 python3-devel python3-pip | |
pip3 install cmake | |
yum remove clang llvm13* -y | |
yum-config-manager --enable rhel-server-rhscl-7-rpms | |
yum install -y devtoolset-7 llvm-toolset-10.0 llvm-toolset-10.0-llvm-devel llvm-toolset-10.0-llvm-static llvm-toolset-10.0-clang-devel | |
source scl_source enable devtoolset-7 llvm-toolset-10.0 | |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz | |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-tools-extra-10.0.1.src.tar.xz | |
tar -xf clang-tools-extra-10.0.1.src.tar.xz | |
tar -xf llvm-10.0.1.src.tar.xz | |
mkdir clang-build | |
mkdir llvm-build | |
cd llvm-build | |
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \ | |
-DCMAKE_BUILD_TYPE=Release ../llvm-10.0.1.src | |
make | |
sudo make install | |
cd ../clang-build | |
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \ | |
-DCMAKE_BUILD_TYPE=Release ../clang-tools-extra-10.0.1.src | |
make | |
sudo make install | |
cd .. | |
git clone https://github.com/iovisor/bcc.git | |
mkdir bcc/build; cd bcc/build | |
cmake .. | |
make | |
sudo make install | |
cmake -DPYTHON_CMD=python3 .. # build python3 binding | |
pushd src/python/ | |
make | |
su | |
sudo make install | |
popd | |
# below | |
yum update -y && yum groupinstall "Development Tools" && yum install -y \ | |
clang \ | |
curl \ | |
git \ | |
elfutils-libelf-devel \ | |
libssl-devel \ | |
m4 \ | |
pkg-config \ | |
python3 \ | |
zlib-devel \ | |
ncurses-devel | |
git clone https://github.com/facebookincubator/below.git | |
cd below | |
cargo install below | |
# FlameGraph | |
git clone https://github.com/brendangregg/FlameGraph.git | |
# linux-tracing-workshop | |
git clone https://github.com/goldshtn/linux-tracing-workshop.git |
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
# bcc | |
sudo apt install -y bison build-essential cmake flex git libedit-dev python3-pip\ | |
libllvm12 llvm-12-dev libclang-12-dev python zlib1g-dev libelf-dev libfl-dev python3-distutils | |
git clone https://github.com/iovisor/bcc.git | |
mkdir bcc/build; cd bcc/build | |
cmake .. | |
make | |
sudo make install | |
cmake -DPYTHON_CMD=python3 .. # build python3 binding | |
pushd src/python/ | |
make | |
sudo make install | |
popd | |
# below | |
sudo apt update -y && sudo apt install -y \ | |
build-essential \ | |
ca-certificates \ | |
clang \ | |
curl \ | |
git \ | |
libelf-dev \ | |
libncursesw5-dev \ | |
libssl-dev \ | |
m4 \ | |
pkg-config \ | |
python3 \ | |
zlib1g-dev \ | |
libelf1 \ | |
libncursesw5 \ | |
zlib1g | |
git clone https://github.com/facebookincubator/below.git | |
cd below | |
cargo install below | |
# FlameGraph | |
git clone https://github.com/brendangregg/FlameGraph.git | |
# linux-tracing-workshop | |
git clone https://github.com/goldshtn/linux-tracing-workshop.git |
Author
paranlee
commented
Jun 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment