lost and found ( for me ? )

install dnsperf 2.0 on Ubuntu13.04 64bit

# tail -1 /etc/lsb-release ;uname -ri
3.8.0-27-generic x86_64

download dnsperf from http://www.nominum.com/support/measurement-tools/
download BIND source from www.isc.org

install required packages to build dnsperf.
# apt-get install libbind-dev build-essential dnsutils bind9 libpcap-dev tshark libxml2-dev libssl-dev libcap-dev tshark

to build dnsperf, you need hmacsha.h
# locate hmacsha.h

Some distributions do not include hmacsha.h when installing bind via its package manager.

If you have not found hmacsha.h, download BIND source code from www.isc.org and use hmacsh.h in BIND source code.
In case of Ubuntu13.04, you will not get hmacsha.h form BIND source code if you install bind9 via apt-get.
# cp bind-9.9.3-P2/lib/isc/include/isc/hmacsha.h /usr/include/isc/

build dnsperf
# tar xzvf dnsperf-src-

# sh configure

# make
In file included from dnsperf.c:56:0:
/usr/include/isc/file.h:28:22: fatal error: isc/stat.h: No such file or directory
compilation terminated.

nn, quick and dirty solution on this is getting stat.h from BIND source and copying it to /usr/include/isc directory.
# cp bind-9.9.3-P2/lib/isc/unix/include/isc/stat.h /usr/include/isc

try again.
nn, another error.
# sh configure

# make
gcc -pthread dnsperf.o  libperf.a -lnsl  -L/usr/lib -lbind9 -ldns -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcrypto -lisccfg -lisc -ldl -lcap -lpthread -lxml2  -lm -o dnsperf
/usr/bin/ld: cannot find -lgssapi_krb5
/usr/bin/ld: cannot find -lkrb5
/usr/bin/ld: cannot find -lk5crypto
/usr/bin/ld: cannot find -lcom_err
collect2: error: ld returned 1 exit status
make: *** [dnsperf] Error 1

okay, again, quick and dirty solution.
# locate gssapi_krb5

# ln -s /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so

# ln -s /usr/lib/x86_64-linux-gnu/libkrb5.so.3 /usr/lib/x86_64-linux-gnu/libkrb5.so

# ln -s /usr/lib/x86_64-linux-g
nu/libk5crypto.so.3 /usr/lib/x86_64-linux-gnu/libk5crypto.so

# ln -s /lib/x86_64-linux-gnu/libcom_err.so.2 /lib/x86_64-linux-gnu/libcom_err.so

try again
# sh configure

# make
gcc -pthread dnsperf.o  libperf.a -lnsl  -L/usr/lib -lbind9 -ldns -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcrypto -lisccfg -lisc -ldl -lcap -lpthread -lxml2  -lm -o dnsperf
gcc -pthread resperf.o  libperf.a -lnsl  -L/usr/lib -lbind9 -ldns -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcrypto -lisccfg -lisc -ldl -lcap -lpthread -lxml2  -lm -o resperf

# make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/share/man/man1
/usr/bin/install -c  dnsperf /usr/local/bin
/usr/bin/install -c  resperf /usr/local/bin
/usr/bin/install -c  resperf-report /usr/local/bin
/usr/bin/install -c -m 644  dnsperf.1 /usr/local/share/man/man1
/usr/bin/install -c -m 644  resperf.1 /usr/local/share/man/man1

# /usr/local/bin/dnsperf -h
DNS Performance Testing Tool
Nominum Version

Usage: dnsperf [-f family] [-s server_addr] [-p port] [-a local_addr]
              [-x local_port] [-d datafile] [-c clients] [-n maxruns]
              [-l timelimit] [-b buffer_size] [-t timeout] [-e] [-D]
              [-y [alg:]name:secret] [-q num_queries] [-Q max_qps]
              [-S stats_interval] [-u] [-v] [-h]

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.