Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeromewolff/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.
https://github.com/jeromewolff/network-monitor

cargo network network-interface networking rust rust-lang

Last synced: 3 days ago
JSON representation

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.

Awesome Lists containing this project

README

        

# 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](https://www.rust-lang.org/tools/install)
- **pnet crate**: This application uses the `pnet` crate for network interface handling and packet processing.

## Installation

1. Clone the repository:
```bash
git clone https://github.com/JeromeWolff/network-monitor.git
cd network-monitor
```

2. Build the project:
```bash
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.

```bash
cargo run --release
```

Replace `` 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