diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-11-02 00:59:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 00:59:56 +0800 |
commit | cf9b9f063420b153225d4e2ff49e22a2f97dbddf (patch) | |
tree | 212f4f2ce049720b8a68a3eff49c605e00753b9a | |
parent | 022eade156d0ee815a1f2200fb7ff3fac71087a8 (diff) |
Reorganise & cleanup (#329)
* Get rid of outdated, unused packaging files
* Create `/res`
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | Makefile | 58 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | completion/bandwhich | 31 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/control | 17 | ||||
-rwxr-xr-x | debian/rules | 22 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | docs/bandwhich.1 | 64 | ||||
-rw-r--r-- | res/demo.gif (renamed from demo.gif) | bin | 3698090 -> 3698090 bytes |
10 files changed, 1 insertions, 212 deletions
@@ -1,14 +1 @@ -.cargo/ target/ -vendor/ -vendor.tar -**/*.rs.bk - -# Debian support - -debian/* -!debian/changelog -!debian/control -!debian/copyright -!debian/rules -!debian/source diff --git a/Makefile b/Makefile deleted file mode 100644 index 3e35f04..0000000 --- a/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -prefix ?= /usr/local - -TARGET=debug -DEBUG ?= 0 -ifeq ($(DEBUG),0) - TARGET = release - ARGS = --release -endif - -VENDOR ?= 0 -ifeq ($(VENDOR),1) - ARGS += --frozen -endif - -APP=bandwhich -BIN=target/$(TARGET)/$(APP) -BIN_DST=$(DESTDIR)$(prefix)/bin/$(APP) -DOC_DST=$(DESTDIR)$(prefix)/share/man/man1/bandwhich.1 -LIC_DST=$(DESTDIR)$(prefix)/share/licenses/$(APP) -AUTOCOMPLETE_DST=$(DESTDIR)$(prefix)/share/bash-completion/completions -SRC = Makefile Cargo.lock Cargo.toml $(shell find src -type f -wholename 'src/*.rs') - -.PHONY: all clean distclean install uninstall vendor install_autocomplete - -all: $(BIN) - -clean: - cargo clean - -distclean: - rm -rf .cargo vendor vendor.tar - -$(BIN): $(SRC) -ifeq ($(VENDOR),1) - tar pxf vendor.tar -endif - cargo build $(ARGS) - -install_autocomplete: - mkdir -p $(AUTOCOMPLETE_DST) - cp completion/bandwhich $(AUTOCOMPLETE_DST)/bandwhich - -uninstall_autocomplete: - rm -f $(AUTOCOMPLETE_DST)/bandwhich - -install: install_autocomplete - install -Dm755 $(BIN) $(BIN_DST) - install -Dm644 docs/bandwhich.1 $(DOC_DST) - install -Dm644 LICENSE.md $(LIC_DST)/LICENSE - -uninstall: uninstall_autocomplete - rm -rf $(BIN_DST) $(DOC_DST) $(LIC_DST) - -vendor: - mkdir -p .cargo - cargo vendor | head -n -1 > .cargo/config - echo 'directory = "vendor"' >> .cargo/config - tar pcf vendor.tar vendor @@ -1,6 +1,6 @@ # bandwhich -![demo](demo.gif) +![demo](res/demo.gif) This is a CLI utility for displaying current network utilization by process, connection and remote IP/hostname diff --git a/completion/bandwhich b/completion/bandwhich deleted file mode 100644 index 4b9cdff..0000000 --- a/completion/bandwhich +++ /dev/null @@ -1,31 +0,0 @@ -# bandwhich completion -*- shell-script -*- - -_bandwhich() -{ - local cur prev flags opts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - flags="--addresses --connections --help --no-resolve - --processes --raw --show-dns --total-utilization --version" - opts="--dns-server --interface" - - interfaces=$(ip link show | grep -o ": .*:" | sed 's/[: ]//g' | tr '\n' ' ') - case "${prev}" in - --interface) - COMPREPLY=( $(compgen -W "${interfaces}" -- "${cur}")) - return - ;; - esac - - case "${cur}" in - --interface) - COMPREPLY=( $(compgen -W "${interfaces}")) - ;; - -*) - COMPREPLY=( $(compgen -W "${flags} ${opts}" -- "${cur}")) - ;; - esac -} && - -complete -o nospace -F _bandwhich bandwhich diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 69b8713..0000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -bandwhich (0.9.0) bionic; urgency=medium - - * Initial debian packaging - - -- Michael Aaron Murphy <michael@system76.com> Thu, 16 Jan 2020 8:26:58 -0700 diff --git a/debian/control b/debian/control deleted file mode 100644 index 7c04b07..0000000 --- a/debian/control +++ /dev/null @@ -1,17 +0,0 @@ -Source: bandwhich -Section: utils -Priority: optional -Maintainer: Michael Aaron Murphy <mmstick@pm.me> -Build-Depends: - cargo (>=0.40), - clang, - debhelper-compat (=9), - rustc (>=1.39) -Standards-Version: 4.4.1 -Homepage: https://github.com/imsnif/bandwhich - -Package: bandwhich -Architecture: any -Depends: ${misc:Depends}, ${shlib:Depends} -Description: Terminal bandwidth utilization tool - Terminal bandwidth utilization tool diff --git a/debian/rules b/debian/rules deleted file mode 100755 index d16f6b9..0000000 --- a/debian/rules +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/make -f - -export VENDOR ?= 1 -export prefix = /usr -CLEAN ?= 1 - -%: - dh $@ - -override_dh_auto_clean: -ifeq ($(CLEAN),1) - make clean; -endif -ifeq ($(VENDOR),1) - if ! ischroot; then \ - make vendor; \ - rm -rf vendor; \ - fi -endif - -override_dh_auto_build: - env CARGO_HOME="$$(pwd)/target/cargo" dh_auto_build diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/docs/bandwhich.1 b/docs/bandwhich.1 deleted file mode 100644 index 1fa0d0e..0000000 --- a/docs/bandwhich.1 +++ /dev/null @@ -1,64 +0,0 @@ -.TH BANDWHICH 1 -.SH BANDWHICH -bandwhich \- display current network utilization by process, connection and remote IP/hostname -.SH SYNOPSIS -.B bandwhich -[\fIFLAGS\fR] -[\fIOPTIONS\fR] -.SH DESCRIPTION -.B bandwhich -provides a responsive terminal dashboard for displaying bandwidth information. It sniffs a given network interface and cross references it with the /proc filesystem. It is responsive to the terminal window size, displaying less info if there is no room for it. It will also attempt to resolve ips to their host name in the background using reverse DNS on a best effort basis. - -It has a raw mode that can be used to parse and log this data. - -.SH FLAGS -.TP -.BR \-a ", " \-\-addresses -Show remote addresses table only -.TP -.BR \-c ", " \-\-connections -Show connections table only -.TP -.BR \-h ", " \-\-help -Prints help information -.TP -.BR \-n ", " \-\-no\-resolve -Do not attempt to resolve IPs to their hostnames -.TP -.BR \-p ", " \-\-processes -Show processes table only -.TP -.BR \-r ", " \-\-raw -Print output to STDOUT so it can be parsed or redirected. -.TP -.BR \-s ", " \-\-show-dns -Show DNS queries -.TP -.BR \-t ", " \-\-total-utilization -Show total (cumulative) usages -.TP -.BR \-V ", " \-\-version -Print version and exit - -.SH OPTIONS -.TP -\fB \-i\fP, \fB\-\-interface\fP \fIinterface\fP -The network interface to listen on, eg. eth0 - -.SH COPYRIGHT -Copyright \(co 2019 Aram Drevekenin -License MIT: https://github.com/imsnif/bandwhich/blob/main/LICENSE.md -.br -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -.SH SEE ALSO -.BR iftop (1), -.BR lsof (1), -.BR nethogs (1), -.BR netstat (1), -.BR nload (1), -.BR ss (1), - -.SH BUGS -Please report bugs here: https://github.com/imsnif/bandwhich/issues Binary files differ |