A DNS performance tracker

DNSPT is a tool to track the DNS performance. DNSPT is written in C++. It uses ldns for generating dns queries, and mysql++ for interacting with MySQL.

DNSPT on Github: GitHub

Reference Manual

DNSPT Quick Start:


DNSPT has a simple logic. You can add a set of domain names, and set a frequency. Once you start the experiments, DNSPT sends DNS queries with the specified frequency, and collects results to calculates statistics about the DNS latencies. DNSPT stores its data in a MySQL database. Thus, every time you start the program you have your previous results.


Config File

First, you need to create a config file describing the database information for DNSPT. The config file must follow the following format:



Building and Running DNSPT

Download the source files from the GitHub. Go to the project directory and do make.

Now, you can run DNSPT by

./dnspt configFileAddress

Note: DNSPT relies on ldns and mysql++ libraries. Make sure you have installed these libraries on your machine. Also, you may need to edit the Makefile to refer to the correct directories for the libraries.

Note: If at run time you get error for loading shared libraries, try following command, and run the DNSPT again.

export LD_LIBRARY_PATH=/usr/local/lib

Note: In order to store data on the database, your MySQL server should be running on the default port and the user specified in the config file must have access to the database specified in the config file. If there is any problem with MySQL access, DNSPT can still be running, but nothing will be stored in the database.


Querying DNSPT

The list of commands are as follows:

add <name> addes a new domain name.
remove <name> removes a domain name.
add_top10 adds Alexa top 10 domains.
remove_all removes all names and statistics.
names shows current domain names.
set_freq <frequency> sets frequency.
get_freq gets current frequency.
start starts performing experiments.
stop stops performing experiments.
stat shows the statistics.
stat_s shows the statistics in ascending order of average latencies.
clear clears the screen.
help shows commands
exit terminates the program and all experiments.

Note: Alexa top 10 domain consists of the following domains. DNSPT automatically adds them the first time you run the program.

  • google.com
  • facebook.com
  • youtube.com
  • yahoo.com
  • live.com
  • wikipedia.org
  • baidu.com
  • baidu.com
  • msn.com
  • qq.com

Note: The command pointer has two shapes as follows:

>: indicates that no experiments is running.
(~)>: indicates that experiments are running.



Using stat and stat_s commands, you can see the resulted statistics. DNSPT computes the following statistics for each specified domain name:

  • Average query time
  • Standard deviation of query times
  • Number of queries made so far
  • Timestamp of first and last query made

Following is a sample sorted statistics for Alexa top 10 domains: