From c255c084f64eddfbdc5571506b7969ab06778705 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:07:58 +0800 Subject: Update usage in README (#409) * Update usage * Write changelog --- CHANGELOG.md | 1 + README.md | 44 ++++++++++++++++++-------------------------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5560e2a..debb559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * CI refactor #399 - @cyqsimon * CI: Temporarily disable UI tests #406 - @cyqsimon * Update README #407 - @cyqsimon +* Update usage in README #409 - @cyqsimon ## Removed diff --git a/README.md b/README.md index 5ff4527..ce32f18 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ This is a CLI utility for displaying current network utilization by process, con - [2. `sudo` (or alternative)](#2-sudo-or-alternative) - [Post install (Windows)](#post-install-windows) - [Usage](#usage) - - [raw\_mode](#raw_mode) - [Contributing](#contributing) - [License](#license) @@ -169,31 +168,24 @@ You might need to first install [npcap](https://npcap.com/#download) for capturi ## Usage ``` -USAGE: - bandwhich [FLAGS] [OPTIONS] - -FLAGS: - -a, --addresses Show remote addresses table only - -c, --connections Show connections table only - -h, --help Prints help information - -n, --no-resolve Do not attempt to resolve IPs to their hostnames - -p, --processes Show processes table only - -r, --raw Machine friendlier output - -s, --show-dns Show DNS queries - -t, --total-utilization Show total (cumulative) usages - -V, --version Prints version information - -OPTIONS: - -i, --interface The network interface to listen on, eg. eth0 - -d, --dns-server A dns server ip to use instead of the system default -``` - -## raw_mode - -`bandwhich` also supports an easier-to-parse mode that can be piped or redirected to a file. For example, try: - -``` -bandwhich --raw | grep firefox +Usage: bandwhich [OPTIONS] + +Options: + -i, --interface The network interface to listen on, eg. eth0 + -r, --raw Machine friendlier output + -n, --no-resolve Do not attempt to resolve IPs to their hostnames + -s, --show-dns Show DNS queries + -d, --dns-server A dns server ip to use instead of the system default + --log-to Enable debug logging to a file + -v, --verbose... Increase logging verbosity + -q, --quiet... Decrease logging verbosity + -p, --processes Show processes table only + -c, --connections Show connections table only + -a, --addresses Show remote addresses table only + -u, --unit-family Choose a specific family of units [default: bin-bytes] [possible values: bin-bytes, bin-bits, si-bytes, si-bits] + -t, --total-utilization Show total (cumulative) usages + -h, --help Print help (see more with '--help') + -V, --version Print version ``` ## Contributing -- cgit v1.2.3