xping - multi target icmp-echo tool

Published 2010-12-18

Introduction

xping is an terminal adhoc monitoring tool. It is useful to determine impact of scheduled disruption or discover subtle changes availability. It presents a visual interface much similar to mtr: time on xaxis with different hosts on yaxis, each echo-reply is drawn as a dot (.) and timeslots without replies are drawn with a question marks (?).

Shown here are hosts recovering from vPC withdrawal:

192.0.2.1   ........................................................
192.0.2.11  .......????????????????.................................
192.0.2.12  ...?...???????????????..................................
192.0.2.13  .......???????????????..................................
192.0.2.14  .......???????????????..................................
192.0.2.15  .......???????????????................?.................
192.0.2.16  .......???????????????..................................
192.0.2.100 ......????????????????????????????????????????????......
192.0.2.101 ......?????????????????????????????????????????????.....
192.0.2.102 ......????????????????????????????????????????????......
192.0.2.103 ......????????????????????????????????????????????......
192.0.2.104 ......???????????????????????????????????????????.......
192.0.2.105 ......???????????????????????????????????????????.......
192.0.2.203 ......???????????????????????????????????????????.......
192.0.2.204 ......???????????????????????????????????????????.......
192.0.2.209 ......???????????????????????????????????????????.......

A recent change may have caused a change in availability:

192.0.2.1  ..............................?..........................
192.0.2.11 .................................................?.......
192.0.2.12 .....................................?...................
192.0.2.13 .............................?...........................
192.0.2.14 ........................................?................
192.0.2.15 ................................................?........
192.0.2.16 .........................................................
192.0.2.20 ..................................?......................
192.0.2.21 ..................................................?......
192.0.2.22 .........................................................
192.0.2.23 ..............................?..........................
192.0.2.24 .....................................?...................
192.0.2.25 ......................................................?..
192.0.2.23 .........................................................
192.0.2.24 ..........................................?..............
192.0.2.29 ..................................?......................

xping uses libevent and sends and receives packets in an asynchronous fashion. The focus is the host availability and round trip timings are not performed. Packet answered 20 seconds after it was sent registers as an answered packet. This is especially visible on mobile links where hundreths of packets may be in pipeline and suddenly change from timeout to answered.

xping offers some accoustic feedback with flags -a and -A respectively emit terminal bell (alarm) on answer and timeout. State transitions can also be used as trigger point, e.g. xping -AA 127.0.0.1 to trigger on answer-to-timeout states, defined as at least two answered packets followed by two unanswered (pattern ..??).

xping(8)

XPING(8)                  BSD System Manager's Manual                 XPING(8)

NAME
     xping — A terminal based, adhoc, multi target icmp-echo tool.

SYNOPSIS
     xping [-46ATVah] [-c count] [-i interval] [host [...]]

DESCRIPTION
     xping is a simple PING program continiously probing multiple hosts using
     ICMP-ECHO. As packets are received dots are printed on the screen.  Hosts
     not responding before next packet is due will get a questionmark in the
     display. The probing stops when SIGINT is received. Host to be probed are
     taken from argument list or read from stdin.

OPTIONS
     -4      Force xping to resolve IPv4 address only.

     -6      Force xping to resolve IPv6 address only.

     -A      Print a bell character on stdout when a packet is missed within
             interval.  If given multiple times only print bell if host goes
             from a responsive state to unresponsive state (e.g. ..??).

     -C      Color resolved hostname according to address family (IPv4 red,
             IPv6 green).

     -c count
             Send count probes in a non-interactive fashion. Default is to
             operate interactively and keep sending probes.

     -T      Track changes to resolved hostname, honoring TTL values. If not
             specified xping will still retry unresolved hostnames.

     -V      Print the "version" of xping and exit.

     -a      Print a bell character on stdout on replies. If given multiple
             times only print bell if host goes from unresponsive to respon‐
             sive (e.g. ??..).

     -h      Display program usage and exit.

     -i interval
             Specifies interval between successive packets to a host. Default
             is 1.0 seconds.

LEGEND
     .       Reply received

     ?       Timeout - interval password with no reply.

     #       Unreachable - the packet could not be delivered.

     %       Other error e.g. TTL expired in transit.

     @       Resolving - waiting for dns lookup to complete.

     !       sendto error e.g. permission denied or no route to destination.

DIAGNOSTICS
     socket: Operation not permitted
             xping could not open a raw socket. Program should be setuid root
             or started as root.

AUTHORS
     xping was written by Martin Topholm.

     xping uses libevent2 by Niels Provos and Nick Mathewson, and uthash and
     utlist by Troy D. Hanson.

BUGS
     xping is not very informative on errors. Terminal display may flicker
     when running without ncurses.

     Probably more.

BSD                            November 14, 2012                           BSD

References