pentest-distro-builder/filesystem/root/.tmux/plugins/tmux-net-speed
Kaj Forney 582f5b5f5c Add autologin and custom tmux config.
Former-commit-id: 09eacc3f3f761c2b3454d20356ba085d18bdb722
Former-commit-id: 89d8a1302bd2a72239fbe9ad9820be4ecda76cab
2018-09-27 17:40:01 -06:00
..
scripts Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00
tests Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00
init.sh Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00
LICENSE Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00
net_speed.tmux Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00
README.md Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00
run-tests.sh Add autologin and custom tmux config. 2018-09-27 17:40:01 -06:00

tmux-net-speed

Tmux plugin to monitor upload and download speed of one or all interfaces.

Usage

Add one of the following format string to status-right tmux option.

Special Credit

This plugin is roughly based on the various plugins in https://github.com/tmux-plugins.

Formats

Shows value in either MB/s, KB/s, or B/s.

  • #{download_speed} - Shows only download speed,
  • #{upload_speed} - Shows only upload speed,
  • #{net_speed} - Shows both the upload and download speeds. Example: "D: 123 MB/s U: 25 MB/s"

Past Values

Since this is a difference, the old values are stored in files in /tmp/. The user must be able to read and write to this directory.

Set Options

Set the following options in your .tmux.conf.

To change which interfaces to pull from, use a space-separated list. If not set, grabs all the interfaces listed in "/sys/class/net/"

set -g @net_speed_interfaces "eth0 eth1"

To change the formatter sting passed to printf.

set -g @download_speed_format "%10s"
set -g @upload_speed_format "%10s"
set -g @net_speed_format "D:%10s U:%10s"

Add plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'tmux-plugins/tmux-net-speed'

Hit prefix + I to fetch the plugin and source it.

If format strings are added to status-right, they should now be visible.

Manual Installation

Clone the repo:

$ git clone https://github.com/tmux-plugins/tmux-net-speed ~/clone/path

Add this line to the bottom of .tmux.conf:

run-shell ~/clone/path/net_speed.tmux

Reload TMUX environment (type this in terminal)

$ tmux source-file ~/.tmux.conf

If format strings are added to status-right, they should now be visible.

Storage of Past Values

This plugin stores the total output for all the interfaces in a file in /tmp/. Therefore, the current user must be able to write and read from that directory.

TODO

  • Add unit tests
  • Add error handling
  • Configure which interfaces to calculate
  • Configure format string for #{net_speed}
  • Handle other OSs (currently only supports Linux)

License

MIT