threshold

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

README

Threshold

Threshold is a simple application based on systemd that automatically brings down a network interface after a specified amount of data has passed through it. Internally, it reads from the /proc/net/dev file to monitor network usage and uses the netlink package to manage network interfaces.

Install

Since this application requires root privileges, you’ll need to install Threshold as the root user and configure the environment accordingly. Assuming you are already logged in as root, add the following lines to the /root/.bash_profile file:

export PATH="$PATH:$HOME/go/bin"
export GOPATH="$HOME/go"

After updating the file, apply the changes by running:

source /root/.bash_profile

You can now install Threshold using the go install command:

go install github.com/enindu/threshold@latest

Usage

You can run Threshold using the following syntax:

threshold <command>:<subcommand> [arguments]
threshold [flags]

To display the version message:

threshold -v # or "threshold --version"

To display the help message:

threshold -h # or "threshold --help"

License

This software is licensed under the GNU General Public License v3.0. You can view the full license here.

Documentation

Overview

Threshold is a simple application based on systemd that automatically brings down a network interface after a specified amount of data has passed through it.

Usage:

threshold <command>:<subcommand> [arguments]
threshold [flags]

Available commands:

daemon
device

Available flags:

-v, --version # View version message
-h, --help    # View help message

Directories

Path Synopsis
commands

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL