Net Monitor is a simple CLI tool to monitor network interfaces activity. It provides real-time statistics on network usage.
To build the project, you need to have Go installed. Clone the repository and run the following command to build the executable:
On Windows:
go build -o bin/nm.exe
On Linux/Unix:
go build -o bin/nd
Alternatively, you can use the provided VS Code task to build the project:
Open the Command Palette (Ctrl+Shift+P). Select Tasks: Run Build Task.
After building the project, you can run the executable to start monitoring network interfaces:
nm monitor
The monitor
command starts monitoring network interfaces and displays real-time statistics.
- Go 1.23.0 or higher
- VS Code (optional, but recommended)
To run the project using VS Code, you can use the provided launch configuration:
- Open the Command Palette (Ctrl+Shift+P).
- Select Debug: Start Debugging.
This will start the monitor
command.
cmd/
: Contains the CLI commands.monitor.go
: Implements the monitor command.root.go
: Defines the root command and initializes subcommands.
main.go
: Entry point of the application.
The project uses the following dependencies:
github.com/shirou/gopsutil
: For fetching network statistics.
github.com/spf13/cobra
: For building the CLI.
This project is licensed under the MIT License. See the LICENSE file for details.