diff options
| author | ache <ache@ache.one> | 2026-08-16 23:18:10 +0200 |
|---|---|---|
| committer | ache <ache@ache.one> | 2026-08-16 23:18:10 +0200 |
| commit | c56755a024c264e9c3028a3cb9696c1afe5dbca9 (patch) | |
| tree | 327a8458ee1e24b858a7c23bf2033618bb867bfe /README.md | |
| parent | Add the -S short option for the status line (diff) | |
Add a real README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 88 |
1 files changed, 80 insertions, 8 deletions
@@ -1,8 +1,7 @@ # rusty-ping -A replacement for [prettyping](https://github.com/denilsonsa/prettyping). - -A basic ping utility that tries to be visual, with no external dependencies. +A replacement for [prettyping](https://github.com/denilsonsa/prettyping). +A very simple ping utility that tries to be as visual as possible, does NOT use the ping command. ## Install @@ -24,11 +23,84 @@ or after installation: $ rusty-ping <host> ``` +## Shell integration + +Rusty-ping doesn't use a config file to keep things as simple as possible. +The goal is to type 'pp' to quickly do a ping, I will not call rusty-ping pp as it may conflict with other CLI. +So the configuration step and alias to 'pp' is done with some shell integration. + +I use fish, so if something breaks with `bash` / `zsh`, just send me a e-mail. + +### Fish + +I prefere to use fish abbreviation. + +`$HOME/.config/fish/function/pp.fish` + +```fish +abbr --add pp rusty-ping --stats --status --default-target 2606:4700:4700::1111 +``` + +But a function works too. + +```fish +function pp + rusty-ping --stats --status --default-target 2606:4700:4700::1111 +end +``` + +### Bash / zsh + +You can just use a functionΒ : + +```bash +function pp { + rusty-ping --stats --legende --status --default-target 2606:4700:4700::1111 +} +``` + +## "User Interface" + +Here is the full UI and the explainationsΒ : + +```shell +rusty-ping --stats --status --default-target git.ache.one --legende +0 β 30 β 50 β 70 β 90 β 120 β
150 β 170 β 190 β 210 β 240 ? <-- The legende (--legende) +PING git.ache.one (145.239.86.0) <-- The status line (--status) +ββββββββ? <-- The ping line +0/9 (0.0%) | β34β β35β [35] [Ξ0]ms <-- Statistics on every packet (--stats) +0/9 (0.0%) | β34β β35β [35] [Ξ0]ms <-- Statistics on the lasts 30 packets (--stats) +``` + +The legende indicate which characters correspond to which RTT in the ping line. +On the ping line, every characters correspond to a ICMP packet send. + +? => Packet not yet received +! => Packet lost + +### The statistics + +RTT is expressed in miliseconds. + +```plain + ββ> Number of packets lost / Total send (Percentage of packets lost) + β ββ> Just a separator +0/9 (0.0%) | β36β β56β [40] [Ξ4]ms + β β β ββ> The mean absolute difference + β β β to the average RTT + β β ββ> The average RTT + β ββ> The maximal RTT + ββ> The minimal RTT +``` + ## Technical Notes -- `clap` to parse args -- `tokio` for `mpsc` -- `icmp` crates for the ping -- Rust 2024 edition +It does NOT use the `ping` command. +It isn't tied to bash or any shell. + +### Rust dependancies: -_Still WIP_ +- `clap` to parse args +- `ping` crate to actually do the ping +- `term_size` to pretty print the legende +- `tokio` for `mpsc`, the default mpsc queue seems to be deprecated |