High resolution pinging

Program pinger

Current source code: pinger.c.

Doxygen documentation: here.

For high resolution pinging pinger does send a ping every second and calculates the exponential moving average of 10, 1000 and 86400 pings, with removing of outliners by a simple cutoff.


Script for plotting the data with Gnuplot

plotting3.sh

This script is for plotting a data file from pinger.


Examples

Example 1

Replacing an ethernet gigabit Switch (D-Link DGS-1008D) by a 4 cm extension adapter at 18:44 reduces the RTT [ms] of Pings with a packet size of 44 Bytes between two PCs by about 30 µs.
Replacing a GB Switch (D-Link DGS-1008D) by a 4 cm extension adapter at 18:44 
reduces the RTT between two PCs by about 30 µs


Example 2

WiFi measurements are much noisier than ethernet gigabit measurements but pinger shows that increasing the distance between a WiFi router and WiFi adapter from 0.70 m to 2500 m increases the RTT about 38.6 µs.
WiFi measurements are much noisier than ethernet gigabit measurements but pinger shows that increasing the distance between a WiFi router 
and WiFi adapter from 0.70 m to 2500 m increases the RTT about 38.6 µs WiFi measurements are much noisier than ethernet gigabit measurements but pinger shows that increasing the distance between a WiFi router 
and WiFi adapter from 0.70 m to 2500 m increases the RTT about 38.6 µs Right picture: A WiFi measturement with a distance of 2.5 km at the Aalbäumle observation tower on the (small) mountain Langert. The red lights at the right side half way up are from the Sender Aalen on the (small) mountain Braunenberg.







Site at the Linuxtag 2014 about my talk about pinger, with slides etc.: Hochauflösende Netzwerküberwachung mit Pings.


The complete article about pinger in the Linux-Magazin 07/2014: Hochauflösende Netzwerküberwachung mit Pings.

Listings from the article..


The article about pinger in the Linux Magazine #165: Pinger - The Pinger network monitoring tool uses ping to look for switches and estimate cable lengths..



The measurements were made with generic (x86_64) kernels under Debian and Ubuntu. With lowlatency or realtime kernels you get better resluts. I used the simple IMP IPv4 pings, but it is also possible to do latency measurements with other types of ping, e. g.:

arping - uses ARP
bing - does ICMP pings plus computing point to point throughput
dhcping - uses DHCP
echoping - uses TCP or UDP
fping - does ping to a list of targets
httping - uses HTTP
mailping - uses SMTP (and TCP)
oping - can send ICMP packets to multiple hosts in parallel and wait for all ECHO_RESPONSE packets to arrive
paping - uses TCP/IP
pathping - shows more information than ping and it's a Microsoft Windows program, similar to traceroute
ping6 - uses IPv6
smtpping - uses SMTP



Update 2015

It is easy to make the pinging with hard realtime to get better results.
First you only need a kernel with the RT_PREEMPT patch, see https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO. This is not complicated because some repositories have such an kernel, so you can simply install it with aptitude install or a similar command.
And doing a new kernel is not complicated, as described in the RT PREEMPT HOWTO. But the configuration is a little complicated because there are (2015-06) 14 RT_PREEMPT options which have to be set but many make targets, e. g. tinyconfig or oldconfig, produce a .config with less options which causes a kernel which is NOT a realtime kernel.
Second you only have to set the posix thread priorities and sheduling algorithm. An example is the program multithreaded_logger multithreaded_logger.
So in the source code you do not need big changes, only some lines more.




Sitemap