OPING(8)

๐Ÿ’– OPING(8) ๐Ÿ’–

okay bestie, welcome to OPING(8) โ€” the manual page for oping, straight out of the liboping household. this is part one of two, so buckle up ๐ŸŽ€


โœจ NAME โœจ

oping โ€” send ICMP ECHO_REQUEST to network hosts. that's it, that's the whole vibe ๐Ÿฆ‹


๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

oping [-4 | -6] [-c count] [-i interval] host [host [host ...]]

oping [-4 | -6] [-c count] [-i interval] -f filename

noping [-4 | -6] [-c count] [-i interval] host [host [host ...]]

noping [-4 | -6] [-c count] [-i interval] -f filename

๐Ÿ’… DESCRIPTION ๐Ÿ’…

so like, oping sends ICMPv4 or ICMPv6 ECHO_REQUEST packets at stuff to figure out two things: is the host even reachable, and how much network latency are we dealing with. ๐Ÿซถ

here's the tea though โ€” unlike the original ping(8), oping can fire ICMP packets at multiple hosts in parallel and then just chill and wait for all the ECHO_RESPONSE packets to come home. and unlike fping (URL's down in "SEE ALSO", iykyk), oping handles both IPv4 and IPv6, transparently, side by side. no cap. ๐Ÿ”ฅ

noping is the ncurses-based front-end to liboping โ€” it shows your ping stats live, online, in real time, and it highlights aberrant round-trip times if your terminal supports colors. main character energy fr fr ๐Ÿ‘‘


๐ŸŒธ OPTIONS ๐ŸŒธ

  • -4 โ€” force the use of IPv4. periodt.
  • -6 โ€” force the use of IPv6. slay.
  • -c count โ€” send (and receive) count ICMP packets, then stop and exit. bye bestie ๐Ÿ’…
  • -i interval โ€” send one ICMP packet (per host) every interval seconds. this can be a floating-point number, so yes, you can go sub-second precision, iconic โœจ
  • -w timeout โ€” how long to wait for an "ECHO REPLY" packet before giving up, in seconds. floating point works here too for sub-second precision. defaults to 1.0 seconds.
  • -t ttl โ€” sets the IP Time to Live to ttl. must be a number between (and including) 1 and 255. if you skip it, the value 64 is used.
  • -I address โ€” sets the source address to use. you can hand it either an IP number or a hostname. you cannot pass the interface name here the way you can with GNU's ping(8) โ€” for that, go use the -D option instead.
  • -D interface name โ€” set the outgoing network device to use. ๐Ÿฆ‹
  • -f filename โ€” instead of listing hostnames on the command line, read them from filename. and if filename is -, read from "STDIN".

if oping is installed with the SetUID-bit, it will set the effective UID to the real UID before opening the file. in the special (but honestly pretty common) case where oping is owned by the super-user (UID 0), that means privileges get temporarily dropped before the file is opened, so users can't just read arbitrary files on the system. protective queen ๐Ÿ›ก๏ธ

but listen โ€” if your system doesn't provide saved set-user IDs (it was an optional feature before POSIX 2001), the behavior is different, because it's simply not possible to temporarily drop privileges. the alternative behavior is: if the real user ID (as returned by getuid(2)) and the effective user ID (as returned by geteuid(2)) differ, the only argument allowed for this option is "-" (i.e. standard input). no wiggle room.
  • -O filename โ€” write measurements in Comma Separated Values (CSV) format to filename. this option writes three columns per row: wall clock time in (fractional) seconds since epoch, hostname, and the round trip time in milliseconds. spreadsheet girlies rise ๐Ÿ™ˆ
  • -Q qos โ€” specify the Quality of Service (QoS) for outgoing packets. okay so this one is a somewhat tricky option, because the meaning of the bits in the IPv4 header has been revised like several times. messy history ngl ๐Ÿ˜ญ

the currently recommended method is Differentiated Services, which is used in IPv6 headers as well. there are shortcuts for various predefined per-hop behaviors (PHBs):

  • be โ€” selects the Best Effort behavior. this is the default behavior.
  • ef โ€” selects the Expedited Forwarding (EF) per-hop behavior, as defined in RFC 3246. this PHB is characterised by low delay, low loss and low jitter, i.e. high priority traffic. VIP treatment fr ๐Ÿ’…
  • va โ€” selects the Voice Admitted (VA) per-hop behavior, as defined in RFC 5865. this traffic class is meant for Voice over IP (VoIP) traffic which uses Call Admission Control (CAC) for reserving network capacity.
  • afcp โ€” selects one of 12 differentiated services code points (DSCPs), organized in four classes with three priorities each. so c must be a number between 1 through 4 and p must be a number between 1 through 3 โ€” for example "af13", "af22" and "af41". in each class, the lower priority number takes precedence over the higher priority number.
  • csn โ€” selects one of the eight Class Selector PHBs. n is a number between 0 through 7. the class selectors were defined to be compatible with the Precedence field in the IPv4 header as defined in RFC 791. please note that "cs0" is synonymous to "be". โœจ

the old definition of those same bits in the IPv4 header was as the Type of Service (ToS) field, specified in RFC 1349. it defined four possible values, which have appropriate aliases. please note that this use of the bits is deprecated and the meaning is limited to IPv4 only! โš ๏ธ

  • lowdelay โ€” minimize delay
  • throughput โ€” maximize throughput
  • reliability โ€” maximize reliability
  • mincost โ€” minimize monetary cost

alternatively, you can also specify the byte manually. you can use either a decimal number (0-255), a hexadecimal number (0x00-0xff) or an octal number (00-0377), using the usual "0x" and "0" prefixes for hexadecimal and octal respectively. ๐Ÿ‘‘

the printed lines will contain information about the QoS field of received packets if either a non-standard QoS setting was used on outgoing packets or if the QoS byte of incoming packets is not zero. in other words: the QoS information is omitted if both the outgoing and the incoming QoS bytes are zero. the received byte is always interpreted as Differentiated Services Code Point (DSCP) and Explicit Congestion Notification (ECN), even if the deprecated Type of Service (ToS) aliases were used to specify the bits of outgoing packets. ๐Ÿงš

  • -m mark โ€” Linux only ๐Ÿง sets the mark (an integer number) on outgoing packets. this can be used by iptables(8) and other networking infrastructure for filtering and routing.
  • -u | -U โ€” noping only. -u forces UTF-8 output, -U disables UTF-8 output. if neither is given, the codeset is automatically determined from the locale. ๐ŸŒˆ
  • -g none|prettyping|boxplot|histogram โ€” noping only. selects the graph to display.
    • none โ€” do not show a graph.
    • prettyping โ€” show a graph with time on the x-axis, and the y-axis shows the round-trip time. this is the default graph.

if your terminal supports unicode and colors, they're used to improve the precision of the data shown: a green box is drawn for round-trip times up to one third of the configured timeout, the height representing the RTT. longer RTTs will start to fill the box yellow (with a green background) and then red (with a yellow background). lost packages are drawn as a bold red exclamation mark. ๐Ÿ’€

  • boxplot โ€” show a box plot where the x-axis, i.e. the width of the window, is the round-trip time. the entire width of the window is the ping interval, set with the -i option.

the box is sized so it contains 50% of the replies. the vertical line shows the median. the whiskers are sized to contain 95% of the replies โ€” 2.5% below the whiskers and 2.5% above.

  |----------[#####|##########]--------------------------------------------|
  ^          ^     ^          ^                                            ^
 2.5%       25%   50%        75%                                         97.5%
  • histogram โ€” show a histogram of the round-trip times. the width of the window is taken as round-trip time from 0ms on the left to the interval (the -i option, default 1000ms) on the right.

the height of the graph is scaled so that the most-used buckets vertically fills the line. the buckets are colored green up to and including the 80th percentile, yellow up to and including the 95th percentile, and red for the remainder. ๐Ÿ”ฅ

  • -b โ€” audible bell. print a ASCII BEL character (\a or 0x07) when a packet is received before the timeout occurs. this can be useful in order to monitor hosts' connectivity without looking physically at the console โ€” for example to trace network cables (start audible beep, disconnect cable N: if beep stops, the cable was in use) or to tell when a host returns from a reboot. ๐Ÿ””

this relies on the terminal bell being functional. to enable the terminal bell, use the following instructions.

  • the visual bell is disabled in your terminal emulator, with the +vb commandline flag or the following in your .Xresources:
XTerm*visualBell: false
  • the PC speaker module is loaded in your kernel:
modprobe pcspkr
  • X11 has the terminal bell enabled:
xset b on; xset b 100
  • and finally, if you are using PulseAudio, that the module-x11-bell module is loaded with a pre-loaded sample defined in your pulseaudio configuration:
load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/complete.oga
load-module module-x11-bell sample=x11-bell
  • -P percent โ€” configures the latency percentile to report. percent must be a number between zero and 100, exclusively in both cases. in general, defaults to 95. if -c is given and a number less than 20, this would be the same as the maximum. in this case the default is chosen so that it excludes the maximum โ€” e.g. if -c 5 is given, the default is 80. the calculated percentile is based on the last 900 packets (15 minutes with the default interval). math girlie moment โœจ
  • -Z percent โ€” if any hosts have a drop rate higher than percent, where percent is a number between zero and 100 inclusively, exit with a non-zero exit status. since it is not possible to have a higher drop rate than 100%, passing this limit will effectively disable the feature (the default). setting the option to zero means that the exit status will only be zero if all replies for all hosts have been received.

the exit status will indicate the number of hosts with more than percent packets lost, up to a number of 255 failing hosts. ๐Ÿ˜ญ

๐ŸŒˆ COLORS ๐ŸŒˆ

okay so bestie, if your terminal supports it, noping is gonna serve looks with its round-trip times (RTT) โ€” it color-codes them in green, yellow and red. no cap, it's a whole vibe check for your packets.

  • green โ€” the RTTs living their best life, chillin' in the "expected" range โœจ
  • yellow โ€” moderately unusual times, likeโ€ฆ a lil sus but not a crisis ๐Ÿซถ
  • red โ€” times that differ a LOT from the expected value, and honestly? red is giving emergency ๐Ÿ’€

so how does it decide which vibe each RTT gets? it's all about the percentile, periodt:

  • RTTs in the 80th percentile are considered "normal" โ†’ printed in green ๐Ÿ’š
  • RTTs within the 95th percentile are "moderately unusual" โ†’ printed in yellow ๐Ÿ’›
  • RTTs above that are "unusual" โ†’ printed in red โค๏ธ

๐ŸŽฎ INTERACTIVE KEYBOARD CONTROLS ๐ŸŽฎ

when you're actually running noping, you're not just a spectator โ€” you're the main character, and the keyboard is your controller, iykyk:

  • g โ€” hit this key and the type of graph being displayed gets swapped out. new graph, new era ๐Ÿ”ฅ
  • a โ€” wanna add a new host? you can do that at literally any time with this key. no restart, no nothing, just add and go ๐Ÿ’…

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


๐Ÿ“œ LICENSE ๐Ÿ“œ

oping and noping are licensed under the GPL 2. and bestie, listen โ€” no other version of the license is applicable. not GPL 3, not "GPL 2 or later", just GPL 2. that's the whole deal, periodt. โš–๏ธ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

liboping is written by Florian "octo" Forster <ff at octo.it>. wanna find its homepage? it's right here: <http://noping.cc/> ๐ŸŒธ

Copyright (c) 2006-2017 by Florian "octo" Forster.


and that's the whole page, bestie ๐ŸŽ€ this was version 1.10.0 of the manual, dated 2017-05-11, filed under OPING(8). go forth and ping responsibly, mwah ๐Ÿ’–โœจ๐Ÿฆ‹