Checking your connections on your StakePool with 'pingNodes'

Hi community,

i made a script that checks the RTTs (round trip times) for your stakepool node.

You can set it up to check all OUTgoing connections from your node to other stakepools,
you can also set it up to show connections that are coming IN to your specified node.
The scripts reads out the whole network data of established peers from netstat, after that it generates
an automated ping report. In this case it uses ping, and if ping is not successful it changes to a tcp/syn check using tcptraceroute to the open port. The script is filtering out duplicated ip’s, so it makes only one ping to a dedicated peer ip.

You can check how “good” your in/out connections are in the ranges:

  • 0 - 50ms
  • 50 - 100ms
  • 100 - 200ms
  • above 200ms

The summary presents a user friendly output of your current stats, you have different options to show
a Top list, also you can hide the ip addresses. This is useful to share some screenshots with other
operators. It’s a useful tool to see if your connections are “ok”, or if you should change your internet connection or move to a vps or similar. It’s a small little helper.

You can download it here from my stakepool website:

After the download, make it executable like:
chmod +x

Or a oneliner for Ubuntu/Debian:
wget && chmod +x

Edit the script with your favorit editor like:
and set the few parameters (LISTENPORT) at the beginning of the script to meet your needs

Run the script simply like:

If you’re having troubles and getting errors, try running it with higher priviledges like:
sudo ./
Sometimes netstat doesn’t show up all the processes of the user with PIDs.

You can also set the wanted LISTENPORT and DIRECTION via the cli (Ver 1.2 and above) like:
./ 3000
./ 3001 out
./ 3001 in
to override the settings in the script.

If you get no found peers, please check that your language for netstat is set correct in the script.

Example for outgoing connections to other stakepool nodes:

You can see, that almost 60% of all outgoing connections are to nodes with less than 50ms RTT. :rocket:

Example for incoming peers:

Here you can see, that around 55% of all incoming connections, that also includes
blocks from the chain, are in the 0-50ms window. :+1:

It’s important for your node to:

  • Be well informed with the latest Block
  • Send out your fresh made Block fast to the Blockchain

I hope this is a useful tool for the community, please give me some feedbacks or share
some screenshots how your peer distribution looks like.


Best regards,
Martin Lang - ATADA StakePool Austria


Update 22-04-2020: Version 1.2 is now available

You can now also set the wanted LISTENPORT and DIRECTION via the cli (Ver 1.2 and above) like:
./ 3000
./ 3001 out
./ 3001 in
to override the settings in the script.

Also you don’t ahve to set the node-process-name and node-instance anymore, the script handles it by itself. :slight_smile:

Update 23-04-2020: Version 1.3 is now available


Thanks for this script …

your times looking pretty good from munich :slight_smile:

Thank You!

By the way guys, pingNodes is also working with the new Haskell cardano-node. For the coreNode and of course for the relayNode. So you can check your connections to other Relays.

I also have the Version 1.4 now for quiet a time, it is doing a auto geo-location-lookup. It will be release with the Shelley MainNet launch, because with the new network structure, only the relayNodes will be exposed to the public. So i will hold back that release to protect the privacy of other StakePoolOps currently running the ITN and jormungandr.

Best regards, Martin

nice tool! worked great