Brutuski / NetUsage

Small Bash Script to see network traffic since last boot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NetUsage

bash license
A simple CLI to view your network usage since last boot.
Can also be used as a module for Polybar


How to use

To get started:

  • git clone https://github.com/Brutuski/NetUsage.git
  • Make the script executable: chmod +x usage.sh
  • To list available options: ./usage.sh -h
  • User needs to provide their interface name, which looks something like enp7s0 or wlp8s0. To list interfaces: ip link
  • For more information about interfaces, refer to Arch wiki

Usage

View all options and help

./usage.sh -h

Display Net Usage on the Terminal

./usage.sh -i <interface_name> -c

Display Net Usager for Polybar

./usage.sh -i <interface_name> -p

Setup Polybar

[module/netusage]
type = custom/script
exec = ./usage.sh -i <interface_name> -p

tail = true
interval = 1

label = "%output%"

Limitations

  • Network usage data is fetched from /proc/net/dev. This script will not work on MacOS in it's current form.
  • Data is displayed only in MB for now. GB will be added in a future update.

About

Small Bash Script to see network traffic since last boot

License:MIT License


Languages

Language:Shell 100.0%