How to install bonnie++ in Linux ?

Today I was installing bonnie++ tool for performance measurement on Linux machine.

I have downloaded the source package from internet on Windows machine.,d.c2E

After that I copied the package into Linux machine in /root directory.

Uses the below command for unpackaging.

cd /root
tar zxvf bonnie++-1.03a.tgz

After that it created directory for me with name bonnie++-1.03a.

cd bonnie++-1.03a

When I was trying to configure, it was throwing the message regarding c++ compliation.

I used the below command to install the C++ and C

yum install gcc*

Again ran the “./configure” it was able to complete successfully.

[root@Node2 bonnie++-1.03a]# ./configure
checking for g++… g++
checking for C++ compiler default output… a.out
checking whether the C++ compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking how to run the C++ preprocessor… g++ -E
checking for a BSD-compatible install… /usr/bin/install -c
checking for an ANSI C-conforming const… yes
checking for egrep… grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for size_t… yes
checking vector.h usability… no
checking vector.h presence… no
checking for vector.h… no
STL not installed so no ZCAV!
checking vector usability… yes
checking vector presence… yes
checking for vector… yes
checking algorithm usability… yes
checking algorithm presence… yes
checking for algorithm… yes
checking algo.h usability… no
checking algo.h presence… no
checking for algo.h… no
checking algo usability… no
checking algo presence… no
checking for algo… no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bonnie.h
config.status: creating port.h
config.status: creating bonnie++.spec
config.status: creating bon_csv2html
config.status: creating bon_csv2txt
config.status: creating sun/pkginfo
config.status: creating conf.h

Now Last step during “make install” again getting error. Found one redhat article to get rid of it.

[root@Node2 bonnie++-1.03a]# make install
g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope   zcav.cpp -o zcav bon_suid.o
zcav.cpp: In function âint main(int, char**)â:
zcav.cpp:73: error: âstrdupâ was not declared in this scope
zcav.cpp:112: error: âstrcmpâ was not declared in this scope
make: *** [zcav] Error 1

Opened the file “vi zcav.cpp” Added the line “#include <cstring>” on top without quotation mark.

After that again issued “make install” got completed successfully.

[root@Node2 bonnie++-1.03a]# make install
g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope   zcav.cpp -o zcav bon_suid.o
mkdir -p /usr/local/bin /usr/local/sbin
/usr/bin/install -c -s bonnie++ zcav /usr/local/sbin
/usr/bin/install -c bon_csv2html bon_csv2txt /usr/local/bin
mkdir -p /usr/local/man/man1 /usr/local/man/man8
/usr/bin/install -c -m 644 bon_csv2html.1 bon_csv2txt.1 /usr/local/man/man1
/usr/bin/install -c -m 644 bonnie++.8 zcav.8 /usr/local/man/man8

Great Now I can start working with bonnie++ on my Linux machine 🙂
[root@Node2 bonnie++-1.03a]# bonnie++
You must use the “-u” switch when running as root.
usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
[-n number-to-stat[:max-size[:min-size][:num-directories]]]
[-m machine-name]
[-r ram-size-in-Mb]
[-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
[-q] [-f] [-b] [-p processes | -y]

Version: 1.03


One thought on “How to install bonnie++ in Linux ?

  1. Pinak Das

    Thank you so much bro! Helped me a lot installing Bonnie++ in my linux distro. Excellent stuff! Keep going 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s