How to use Bonnie++ in Linux ?

In my previous article I have shown how we can install bonnie++ in Linux. After that I started playing with it. In this article showing the usage of Bonnie++.

Step 1 : As we can’t the run the bonnie using root user. I have created user user1 to run the bonnie.

[root@Node2 ~]# bonnie++ -d /tmp -s 2G -m FIRST -f -b -u user1
Using uid:500, gid:500.
Writing intelligently…done
Reading intelligently…done
start ’em…done…done…done…
Create files in sequential order…done.
Stat files in sequential order…done.
Delete files in sequential order…done.
Create files in random order…done.
Stat files in random order…done.
Delete files in random order…done.
Version  1.03       ——Sequential Output—— –Sequential Input- –Random-
-Per Chr- –Block– -Rewrite- -Per Chr- –Block– –Seeks–
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
FIRST            2G           35295  12 23174   7           73718  10  95.6   1
——Sequential Create—— ——–Random Create——–
-Create– –Read— -Delete– -Create– –Read— -Delete–
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
16   321   8 +++++ +++   366   3   259   6 +++++ +++   372   3

Step 2 : During the test I went to /tmp directory to see what exactly Bonnie is doing.

cd /tmp
ls -lrt Bonnie*
drwx——. 2 user1 user1 532480 Sep 22 17:09 Bonnie.5583

cd Bonnie.5583
[root@Node2 Bonnie.5583]# ls -lrt | wc -l

It has created so many empty files in it. Just randomly checking one file in it.

[root@Node2 Bonnie.5583]# cat iQSm5MiG0007844
[root@Node2 Bonnie.5583]# file !$
file iQSm5MiG0007844
iQSm5MiG0007844: empty
[root@Node2 Bonnie.5583]# stat !$
stat iQSm5MiG0007844
File: `iQSm5MiG0007844′
Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fd00h/64768d    Inode: 433408      Links: 1
Access: (0600/-rw——-)  Uid: (  500/   user1)   Gid: (  500/   user1)
Access: 2014-09-22 17:09:37.154097650 +0530
Modify: 2014-09-22 17:09:22.710004214 +0530
Change: 2014-09-22 17:09:22.710004214 +0530

Step 3 : After that if you want to see the output of step 1 in more organized form. We can take the last line from output. Use the below command to convert it into html format.

[root@Node2 ~]# echo “FIRST,2G,,,35295,12,23174,7,,,73718,10,95.6,1,16,321,8,+++++,+++,366,3,259,6,+++++,+++,372,3” | bon_csv2html > /tmp/first.html

Step 4 : I copied the first.html file to my windows machine using winscp. Now we can see the results by opening it with browser.



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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s