In one of my projects I was trying to know the impact of doing massive DNS queries on a DNS server, using the “top” command and looking at the screen wasn’t a good solution, things should be done automatically, then path was clear: Jenkins + DNSPerf + dstat + gnuplot.

For starters, we need:

  1. A Jenkins servers.
  2. An Ubuntu slave.
  3. Have gnuplot and dnsperf installed on Ubuntu slave.
  4. Ubuntu slave should be able to ssh into DNS server by using SSH Keys (you can read this to get an idea).
  5. DNS Server should have dstat installed.

How to install dstat

apt-get install dstat

How to install gnuplot on ubuntu slave

apt-get install gnuplot

How to install dnsperf on ubuntu slave

sudo apt-get install libbind-dev build-essential

sudo apt-get install dnsutils bind9

sudo apt-get install libcap-dev tshark

sudo apt-get install libxml2-dev

sudo apt-get install libssl-dev

sudo apt-get install libcap-dev

wget ftp://ftp.isc.org/isc/bind9/9.9.0/bind-9.9.0.tar.gz

tar zxvf bind-9.9.0.tar.gz

sudo cp -p bind-9.9.0/lib/isc/include/isc/hmacsha.h /usr/include/isc/

 

#IF OS is 64bits

sudo ln -s /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so #IF OS is 32bits

sudo ln -s /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2 /usr/lib/i386-linux-gnu/libgssapi_krb5.so

wget ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-src-2.0.0.0-1.tar.gz

tar zxvf dnsperf-src-2.0.0.0-1.tar.gz

cd dnsperf-src-2.0.0.0-1/

./configure

make

sudo make install

Based on snobbycloud post

Now, let’s create some scripts in our slave server, these gnuplot scripts are going to process the system data obtained during the DNSPerf execution and create the graphic representation.

 

 

Now, set all three scripts as executables, then create some symlinks for these scripts at /usr/bin:

ln -sf /the/place/where/your/script/is/cpudata.sh /usr/bin/cpudata

ln -sf /the/place/where/your/script/is/memorydata.sh /usr/bin/memorydata

ln -sf /the/place/where/your/script/is/networkdata.sh /usr/bin/networkdata

Once you have your slave in place, go to Jenkins, create a new task and add a Command-line execution section with the following content:

The Results

Once you run the task, jenkins will generate the following file:

But it will work with just this info:

And finally, the three gnuplot script will generate the following pics

With this information, you can make your own conclusion and take the right decisions.

 

Follow me

Carlos Alberto Umanzor Arguedas

Web Developer at carlosumanzor.com
Web Developer, QA Engineer and Gamer Enthusiast, Developer of Linkcrawler and Father of a future computer ninja.
Follow me

Pin It on Pinterest

Shares
Share This
Optimization WordPress Plugins & Solutions by W3 EDGE