Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.71 KB

README.md

File metadata and controls

62 lines (46 loc) · 1.71 KB

network-monitor

A simple Rust application that captures and monitors network packets on a specified network interface, periodically printing and saving packet metrics to a JSON file.

Features

  • Captures packets on a specified network interface.
  • Counts the total packets and bytes captured.
  • Outputs metrics to the console every 5 seconds.
  • Saves metrics snapshots to a JSON file (metrics.json).

Prerequisites

  • Rust: Ensure that Rust is installed. Install Rust
  • pnet crate: This application uses the pnet crate for network interface handling and packet processing.

Installation

  1. Clone the repository:

    git clone https://github.com/JeromeWolff/network-monitor.git
    cd network-monitor
  2. Build the project:

    cargo build --release

Usage

Run the application by specifying a network interface to capture packets on. You can find available interfaces using the ip a command on Linux.

cargo run --release <interface_name>

Replace <interface_name> with the name of the network interface to capture packets on.

Contributing

Contributions are welcome! Please open an issue to discuss what you would like to change.

Contributors

JeromeWolff
Jerome Wolff