Tools - fping-rust


fping-rust was an attempt to port the original C program fping to Rust.
Some features are missing, but others are included.

In theory, it can be used with common tools such as smokeping

This version is licensed under the GPL

Installation

To use this, rust-lang must be installed https://rust-lang.org/

cargo install fping-rust

Make fping either setuid, or, if under Linux

sudo setcap cap_net_raw,cap_net_admin+ep fping

If you can't run fping as root or can't use the cap_net_raw capability, you can also run fping in unprivileged mode. This works on MacOS and also on Linux, provided that your GID is included in the range defined in /proc/sys/net/ipv4/ping_group_range. This is particularly useful for running fping-rust in rootless / unprivileged containers.

echo "net.ipv4.ping_group_range = 0 2147483647" >> /etc/sysctl.d/local.conf

Usage

fping -h
Fast ping to multiple hosts

Usage: fping [OPTIONS] [TARGETS]...

Arguments:
  [TARGETS]...  Target hosts

Options:
  -c, --count           Count mode: send N pings to each target
  -C, --vcount          Same as -c but verbose output (all RTTs)
  -l, --loop               Loop mode: send pings forever
  -i, --interval     Interval between packets in ms (default: 10) [default: 10]
  -p, --period       Per-host interval in ms (default: 1000) [default: 1000]
  -t, --timeout      Timeout in ms (default: 500) [default: 500]
  -r, --retry       Number of retries (default: 3) [default: 3]
  -B, --backoff   Exponential backoff factor (default: 1.5) [default: 1.5]
  -b, --size        Ping data size in bytes (default: 56) [default: 56]
  -f, --file         Read hosts from file (- = stdin)
  -a, --alive              Show only alive hosts
  -u, --unreach            Show only unreachable hosts
  -q, --quiet              Quiet: don't show per-ping results
  -s, --stats              Print final stats
  -e, --elapsed            Show elapsed time on received packets
  -A, --addr               Show targets by address
  -D, --timestamp          Timestamp before each line
  -J, --json               JSON output (requires -c, -C or -l)
  -4, --ipv4               Use IPv4 only
  -6, --ipv6               Use IPv6 only
      --report-all-rtts    Show all individual RTTs
  -x, --reachable       Minimum number of reachable hosts to be considered success
  -S, --source     Source address for outgoing pings
      --oiface      Bind outgoing packets to this network interface (e.g. eth0)
      --tui                Enable interactive TUI mode (ncurses)
  -h, --help               Print help
  -V, --version            Print version
        

Downloads

Support