A Linux disk I/O monitoring and reporting tool that tracks I/O operations, bandwidth, and latency per process using eBPF.
Meridian uses eBPF kprobes to intercept VFS layer read/write operations, capturing:
- Process ID and command name
- I/O operation type (read/write)
- Bytes transferred
- Operation latency
- Timestamps
Events can be filtered by process command name (comm) to focus on specific applications.
- Linux kernel with eBPF support (5.4+)
- Rust stable toolchain
- Rust nightly toolchain (for eBPF compilation)
bpf-linkerfor linking eBPF programs- Root privileges (or CAP_BPF + CAP_PERFMON) for loading eBPF programs
Install the BPF linker:
cargo install bpf-linkerEnsure nightly toolchain is available:
rustup toolchain install nightly
rustup component add rust-src --toolchain nightlyBuild the entire project (including eBPF probes):
cargo buildThe eBPF probes are automatically compiled via build.rs using the nightly toolchain.
Tests require root privileges to load eBPF programs:
sudo -E $(which cargo) test --test vfs_probeWith output:
sudo -E $(which cargo) test --test vfs_probe -- --nocaptureRun the meridian CLI:
sudo ./target/debug/meridian --bpf-path ./target/bpf/meridian-probesWith comm filtering (only monitor dd processes):
sudo ./target/debug/meridian --bpf-path ./target/bpf/meridian-probes --comm ddWith a custom OTLP gRPC endpoint for metrics export (defaults to http://localhost:4317):
sudo ./target/debug/meridian --bpf-path ./target/bpf/meridian-probes --otlp-endpoint http://otel-collector:4317meridian/
├── meridian/ # User-space agent and CLI
│ ├── src/
│ │ ├── lib.rs # Library: load_and_attach, read_events
│ │ ├── main.rs # CLI binary
│ │ └── bin/ # Helper binaries
│ ├── tests/ # Integration tests
│ └── build.rs # eBPF build script
├── meridian-common/ # Shared types (no_std compatible)
│ └── src/lib.rs # VfsEvent, IoOp, COMM_LEN
├── meridian-ebpf/ # eBPF probes (built for bpfel-unknown-none)
│ └── src/main.rs # kprobe/kretprobe for vfs_read/vfs_write
└── SPECIFICATION.md # Detailed project specification
See SPECIFICATION.md for detailed design documentation.
MIT