用bonnie测试硬盘

最近测试阵列柜,学习了三个程序,分别是:
iozone,xdd,bonnie
总的来说,各有优缺点。

iozone命令测试的项目比较多,结果也比较多,需要耐心察看,但是不能测试裸设备。
xdd可以测试裸设备,但是可以察看的结果指标也比较少。
bonnie也不能测试裸设备,相对于iozone来说项目结果比较少,相对比较清晰。

下面看一下bonnie的用法。


1,下载程序.
http://www.textuality.com/bonnie/

2,解压:
[root@test root]# tar -zxvf bonnie.tar.gz
Makefile
Instructions
Bonnie.c
bonnie.1

3,编译:
[root@test bonnie]# ls -al
总用量 40
drwxr-xr-x 2 root root 4096 5?? 11 21:46 .
drwxr-x--- 15 root root 4096 5?? 11 21:46 ..
-rw-rw-r-- 1 468 ftp 2451 1996-08-29 bonnie.1
-rw-r--r-- 1 468 ftp 17816 1996-08-29 Bonnie.c
-rw-r--r-- 1 468 ftp 551 1996-08-29 Instructions
-rw-r--r-- 1 468 ftp 237 1996-08-29 Makefile
[root@test bonnie]# make
Options are "make bsd" and "make SysV" - the default is "bsd".
If you get messages about missing functions, try "make SysV."
make Bonnie
make[1]: Entering directory `/root/bonnie'
cc -O Bonnie.c -o Bonnie
make[1]: Leaving directory `/root/bonnie'
[root@test bonnie]# ls
Bonnie bonnie.1 Bonnie.c Instructions Makefile

4,命令非常简单,只有几个选项:
The Bonnie command line, given here in Unix style, is:


Bonnie [-d scratch-dir] [-s size-in-Mb] [-m machine-label] [-html]

All the things enclosed in square brackets may be left out. The meaning of the things on this line is:

Bonnie
The name of the program. You might want to give it a different name. If you are sitting in the same directory as the program, you might have to use something like ./Bonnie.

-d scratch-dir
The name of a directory; Bonnie will write and read scratch files in this directory. Bonnie does not do any special interpretation of the directory name, simply uses it as given. Suppose you used -d /raid1/TestDisk; Bonnie would write, then read back, a file whose name was something like /raid1/TestDisk/Bonnie.34251.
If you do not use this option, Bonnie will write to and read from a file in the current directory, using a name something like ./Bonnie.35152.
Bonnie does clean up by removing the file after using it; however, if Bonnie dies in the middle of a run, it is quite likely that a (potentially very large) file will be left behind.

-s size-in-Mb
The number of megabytes to test with. If you do not use this, Bonnie will test with a 100Mb file. In this discussion, Megabyte means 1048576 bytes. If you have a computer that does not allow 64-bit files, the maximum value you can use is 2047.
It is important to use a file size that is several times the size of the available memory (RAM) - otherwise, the operating system will cache large parts of the file, and Bonnie will end up doing very little I/O. At least four times the size of the available memory is desirable.

-m machine-label
This is the label that Bonnie will use to label its report. If you do not use this, Bonnie will use no label at all.

-html
If you use this, Bonnie will generate a report in HTML form, as opposed to plain text. This is not all that useful unless you are prepared to write a table header.

5,测试:
[root@test bonnie]# ./Bonnie -d /root -s 2048 -m jump
File too large for 32-bit machine, sorry
第一次出现错误,看作者的命令说明就知道了。

[root@test bonnie]# ./Bonnie -d /root -s 2046 -m jump
File '/root/Bonnie.24943', size: 2145386496
Writing with putc()...done
Rewriting...done
Writing intelligently...done
Reading with getc()...done
Reading intelligently...done
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
jump 2046 13597 93.4 24547 17.8 12959 9.0 9682 59.7 32970 9.6 226.0 1.9

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-245660/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/312079/viewspace-245660/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值