Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jeromewolff/network-monitor
- Owner: JeromeWolff
- Created: 2024-11-13T19:46:46.000Z (4 days ago)
- Default Branch: master
- Last Pushed: 2024-11-13T20:01:20.000Z (4 days ago)
- Last Synced: 2024-11-13T20:36:12.544Z (4 days ago)
- Topics: cargo, network, network-interface, networking, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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