Skip to content

File Monitoring using eBPF

Published: at 10:02 PM

Linux based File Monitoring using eBPF

Keep an eagle-eye on your files with ebpf-file-monitor, a slick Rust program powered by cutting-edge eBPF technology. This utility alerts you instantly whenever changes occur in your files, ensuring you’re always in the loop.

Features

Prerequisites

Ensure you have the following prerequisites installed:

Installation

# Clone the repository
git clone https://github.com/mranv/ebpf-file-monitor.git

# Navigate to the directory
cd ebpf-file-monitor

# Install bcc and libbpf if needed
# For Fedora/RedHat:
sudo yum install bcc bpf
# For Debian/Ubuntu:
sudo apt-get install libbpf-dev libbcc-dev

# Build the project
cargo build --release

Usage

Update the FILE_PATH variable in the source code to the file you want to monitor. Then, unleash the watchdog:

./target/release/ebpf-file-monitor

Now, sit back and relax as it prints timestamps whenever changes occur in the specified file.

Implementation

Limitations

Contributions

Got ideas to enhance this utility? Contributions are welcome! Feel free to share your thoughts and suggestions to make this watchdog even better.

About

This utility is designed to track changes in specified files and provide instant timestamps upon modifications.

Repository: github.com/mranv/ebpf-file-monitor

© 2024 GitHub, Inc. All rights reserved.


Disclaimer: This blog post is licensed under the MIT license. Please refer to the repository for the full license details.