Update help text and README.md

This commit is contained in:
Stephen Seo 2022-12-11 21:55:27 +09:00
parent 3889eb6dcc
commit d34e597360
2 changed files with 16 additions and 8 deletions

View file

@ -17,14 +17,15 @@ tiling Wayland compositor](https://swaywm.org).
## Help Text ## Help Text
Usage: Usage:
-h | --help Prints help -h | --help Prints help
--netdev=<device_name> Check network traffic on specified device --netdev=<device_name> Check network traffic on specified device
--netdev_width=<width> Sets the min-width of the netdev output (default 10) --netdev_width=<width> Sets the min-width of the netdev output (default 10)
--netgraph_max_bytes=<bytes> Enable "graph" output when polling network traffic --netgraph_max_bytes=<bytes> Enable "graph" output when polling network traffic
--interval-sec=<seconds> Output at intervals of <seconds> (default 5) (Set to "dynamic" instead of a byte count for dynamic sizing)
--acpi-builtin Use "acpi -b" built-in fetching (battery info, with color) --interval-sec=<seconds> Output at intervals of <seconds> (default 5)
--regex-cmd=<cmd>[SPLIT]<args...>[SPLIT]<regex> Use an output of a command as a metric --acpi-builtin Use "acpi -b" built-in fetching (battery info, with color)
--time-format=<date format string> Set the format string for the date --regex-cmd=<cmd>[SPLIT]<args...>[SPLIT]<regex> Use an output of a command as a metric
--time-format=<date format string> Set the format string for the date
## Usage ## Usage
@ -107,6 +108,10 @@ characters](https://en.wikipedia.org/wiki/Block_Elements)). Thus, this outputs
a history graph of network traffic. A sane value for `<bytes>` can be 1048576, a history graph of network traffic. A sane value for `<bytes>` can be 1048576,
which is 1 MiB. which is 1 MiB.
Specify "dynamic" instead of a bytecount (such as
`--netgraph_max_bytes=dynamic`) to have the graph dynamically resize based on
the maximum amount of bytes transferred in an interval.
## Dependencies ## Dependencies
Uses [`serde_json`](https://crates.io/crates/serde_json), Uses [`serde_json`](https://crates.io/crates/serde_json),

View file

@ -64,6 +64,9 @@ pub fn print_usage() {
stderr_handle stderr_handle
.write_all(b" --netgraph_max_bytes=<bytes>\t\t\t\tEnable \"graph\" output when polling network traffic\n") .write_all(b" --netgraph_max_bytes=<bytes>\t\t\t\tEnable \"graph\" output when polling network traffic\n")
.ok(); .ok();
stderr_handle
.write_all(b" \t\t\t\t (Set to \"dynamic\" instead of a byte count for dynamic sizing)\n")
.ok();
stderr_handle stderr_handle
.write_all( .write_all(
b" --interval-sec=<seconds>\t\t\t\tOutput at intervals of <seconds> (default 5)\n", b" --interval-sec=<seconds>\t\t\t\tOutput at intervals of <seconds> (default 5)\n",