-
Notifications
You must be signed in to change notification settings - Fork 5
How to Install NoDrop from the Source Code
Currently, NoDrop supports Linux systems only. This page describes how to build NoDrop from source.
Before compiling NoDrop, ensure the following tools are installed:
- make
- CMake
- GCC/G++ > 8.0 (must support the --static-pie option)
- pkg-config
You can install them using your system package manager. For example on Ubuntu:
sudo apt update
sudo apt install build-essential cmake pkg-configNoDrop relies on Linux kernel tracepoints to capture system events.
The following kernel options must be enabled (they are usually enabled in standard kernels):
CONFIG_TRACEPOINTSCONFIG_HAVE_SYSCALL_TRACEPOINTS
If you are using a custom-built kernel, please verify that these options are enabled.
NoDrop depends on musl libc, Lua, and zlib.
Helper scripts are provided to automatically download these dependencies.
Run the following commands from the project root directory:
./scripts/getmusl.sh <absolute-path-to-NoDrop>
./scripts/getlua.sh
./scripts/getzlib.shExample:
./scripts/getmusl.sh $(pwd)
./scripts/getlua.sh
./scripts/getzlib.shThese scripts will download the required source code and prepare it inside the project directory.
To compile NoDrop:
mkdir build
cd build
cmake ..
make load
make ctrl
sudo make installExplanation:
-
make loadBuilds and loads the NoDrop kernel module.
-
make ctrlBuilds the user-space control utility used by the nodrop command.
-
make installInstall
nodropcommand (/usr/local/bin/nodrop)
After this step, you can use the nodrop command system-wide.
Example:
nodrop startNoDrop provides several configuration options that can be specified when generating the CMake build files.
| Option | Description | Default |
|---|---|---|
BUFFER_SIZE |
Size of each per-thread buffer | 1*Mib |
MONITOR_PATH |
Path to the monitor executable | ${PROJECT_BINARY_PATH}/monitor/monitor |
STORE_PATH |
Directory used to store event data | /tmp/nodrop |
PKEY_SUPPORT |
Intel Protection Keys support | ON |
You can specify these options when running cmake:
cmake .. \
-DBUFFER_SIZE=8*Mib \
-DMONITOR_PATH=/my/path/to/monitor \
-DSTORE_PATH=/my/path/to/storeNoDrop uses Intel Protection Keys (PKEY) to protect its memory.
PKEY support is enabled by default.
If your CPU does not support PKEY, you must disable this feature.
Otherwise, the program will trigger a SIGILL due to illegal instructions.
To disable PKEY support:
cmake .. -DPKEY_SUPPORT=off