Last updated on

Installation Instructions

In the following, we cover LiME's installation procedure. This page includes:

Kernel Requirements

requires a Linux kernel with BTF (BPF Type Format) information enabled. Make sure your kernel version is 5.15 or later and is compiled with CONFIG_DEBUG_INFO_BTF=y.

For detailed kernel requirements and recommendations, please refer to the documentation page.

Installing Dependencies

On Ubuntu/Debian:

# Install required dependencies
sudo apt-get update
sudo apt-get install -y libbpf-dev libelf-dev zlib1g-dev pkg-config clang protobuf-compiler

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Building from Source

# Clone the repository
git clone https://github.com/LiME-org/lime-rtw.git
cd lime-rtw

# Build the project
cargo build --release

# Note: Root privileges are required to load eBPF programs
sudo target/release/lime-rtw

Target Kernel Version at Compile Time

During compilation the build script determines which kernel version to target for the eBPF program. By default it uses the host kernel reported by uname -r, but you can override it when compiling on one machine for another kernel (e.g., cross-building) by exporting LIME_TARGET_KERNEL_VERSION:

LIME_TARGET_KERNEL_VERSION=5.15.0 cargo build --release

The variable accepts values of the form major.minor[.patch] (for example 5.15 or 6.6.32). If the variable is unset or empty and the host kernel cannot be detected, the build will fail with an error that asks you to provide the variable explicitly.

Verifying the Installation

To verify that is working correctly, try running a simple trace:

# Trace htop running with SCHED_FIFO policy
sudo lime-rtw trace -- chrt -f 99 htop

If the installation is successful, you should see tracing files generated in the current directory after stopping the trace (Ctrl+C).