Monitor network traffic of a group of processes
Project description
Network Monitoring for Processes
netmon-proc is a network monitoring CLI tool designed to monitor network traffic and provide detailed metrics for specified processes. It leverages Scapy for packet sniffing and offers multiple formatting options for the output.
Table of Contents
Features
- Real-time network traffic monitoring for specific processes.
- Metrics aggregation and reporting.
- Support for different output formats, including JSON and tabular formats.
- Threaded implementation for efficient performance.
- Customizable filtering using BPF (Berkeley Packet Filter) syntax.
Installation
You can install netmon-proc from PyPI or by pulling the Docker image.
From PyPI
- Install the package using pip:
pip install netmon-proc
From Docker
- Pull the Docker image:
docker pull 0xzer0x/netmon-proc
- Run the container:
docker container run -it --pid=host --network=host --cap-add CAP_SYS_PTRACE 0xzer0x/netmon-proc
From Source
- Clone the repository:
git clone https://github.com/0xzer0x/netmon-proc.git
cd netmon-proc
- Install main dependencies:
poetry install --without=dev
- Build the package:
poetry build
- Install the package:
pip install dist/netmon_proc-0.x.x-py3-none-any.whl
Usage
Command Line Interface
netmon-proc provides a CLI for starting the network monitoring tool. Below are some usage examples.
netmon-proc --help
Example Command
To start monitoring network traffic for a specific process with a BPF filter and output the results in a table format:
netmon-proc --filter "tcp port 443" --format table --metrics rx_bytes firefox
License
This project is licensed under the GPL v3 License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netmon_proc-0.2.11.tar.gz.
File metadata
- Download URL: netmon_proc-0.2.11.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4162b72b9f3cd79d1c716c352a20fa5fc4550e2a99847adb2833876e4b199752
|
|
| MD5 |
50cb6b3e795ce3a9517ad8ae0a3c0a00
|
|
| BLAKE2b-256 |
6c3741c304b9aa03c77d6035d9c6261e9c586bd8179efc66899a77466d332a15
|
File details
Details for the file netmon_proc-0.2.11-py3-none-any.whl.
File metadata
- Download URL: netmon_proc-0.2.11-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae2f00af20c2d0b7df2a1e8a45d0a89d9e5d1be687a2be8e14e4c52ad4367c60
|
|
| MD5 |
3c010e047b94dba6f0d6ed323eccf952
|
|
| BLAKE2b-256 |
8b6ab8876b2628f22f522b48266e706e417adc616b605f6f4249a0a61727e212
|