前面有分享了windows下如何使用IOMETER来测试网络磁盘的IO性能,今天分享一下linux下如何使用IOMETER来测试网络磁盘的性能。在linux下和window下工作模式有些区别:在linux上,iometer包括两部分:IOmeter主程序和执行代理,你可以在windows上安装运行iometer主程序,在linux上安装运行iometer执行代理,主程序就会把读写配置传递给执行代理来执行。
首先:在linux下安装iomter,以我的redhat 6.1 64位的操作系统为例,到iometer主页上下载版本:iometer-2008-06-22-rc2.src.tgz上传到linux中进行如下操作:
-
- [root@DELL-1 tmp]# tar zxvf iometer-2008-06-22-rc2.src.tgz //解压
- [root@DELL-1 tmp]# cd iometer-2008-06-22-rc2/src //进入iometer src文件下有多个Makefile文件找到自己需要的文件版本
- [root@DELL-1 src]# make -f Makefile-Linux.x86_64 dynamo //我的系统是64位所以选择这个文件安装编译
可能上面的安装编译会出现make: *** [Pulsar.o] Error 1的错误,请进入《linux 64位编译iometer提示make: *** [Pulsar.o] Error 1错误的解决方法》查看解决方法。
其次:在windows下安装IONETER主程序,注意版本要和linux下的一样,我用的是:iometer-2008-06-22-rc2.win.x86_64.zip
最后:如何在linux运行iometer?
先在windows打开iometer主程序,再在linux下进入刚才的安装目录:cd /tmp/iometer-2008-06-22-rc2/src/运行如下命令:
- [root@DELL-1 src]# ./dynamo -i 172.18.30.7 -m 172.18.30.17
说明:-i后面用的是windows端的ip, -m后面使用的是linux的IP。
运行如上命令可以出现以下错误:
-
- [root@DELL-1 src]# ./dynamo -i 172.18.30.7 -m 172.18.30.17
- ===> ERROR: Getting host name for "DELL-1" failed.
-
- [PortTCP::Create() in IOPortTCP.cpp line 238]
- errno = 11
- *** Could not create a TCP/IP Port. exiting.....
原因:当网络环境没有使用DNS会造成hostname和IP无法对应上。
解决方法:在linux下进入/etc配置hosts文件下的hostname如下:我的linux命名为DELL-1所以在hosts文件的127.0.0.1后添加DELL-1。
- [root@DELL-1 etc]# cat hosts
- 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 DELL-1
一切问题都解决了,正常情况如下:
-
- [root@DELL-1 src]# ./dynamo -i 172.18.30.7 -m 172.18.30.17
- Fail to open kstat device file. You can ignore this warning
-
- unless you are running dynamo on XSCALE CPU.
-
- Command line parameter(s):
- Looking for Iometer on "172.18.30.7"
-
- Sending login request...
-
- DELL-1
- 172.18.30.17 (port 38250)
-
- Successful PortTCP::Connect
- - port name: 172.18.30.7
-
- *** If dynamo and iometer hangs here, please make sure
-
- *** you use a correct -m <manager_computer_name> that
- *** can ping from iometer machine. use IP if need.
-
- Login accepted.
- Reporting drive information...
-
- Set_Sizes: Open on "/sys/iobw.tst" failed (error No such file or directory).
- Set_Sizes: Open on "/proc/sys/fs/binfmt_misc/iobw.tst" failed (error Permission denied).
-
- Set_Sizes: Open on "/var/lib/nfs/rpc_pipefs/iobw.tst" failed (error Permission denied).
- Physical drives (raw devices)...
- Reporting TCP network information...
- done.
还有一个问题要注意的是先要在windows下打开iometer主程序,再在linux下运行上面的命令,否则可能出现问题。最后可以在windows上的iometer看到DELL-1的所有磁盘映射。
这样就可以直接在windows下对linux磁盘进行测试,测试方法和windows方法一致见《手把手教你如何使用IOMETER测试工具测试存储》。

2012年6月20日 上午9:37 沙发
文章最前面不是说分享了windows下使用iometer的经验吗,为什么不加一个链接啊。
在Windows中对linux的磁盘进行测试,挺有意思的。
2012年6月20日 上午9:38 板凳
我还想问下你的博客的代码插入是用了什么插件吗?好像可以实现自动换行,可以分享一下吗?
2012年6月20日 上午10:02 1层
@jsxubar 你看看我这篇文章有写怎么通过代码实现这个方法:http://www.datacentersky.com/wordpress-paste-killed-killed-the-code-similar-to-the-code-editor-style.html
2012年9月7日 上午9:00 地板
留言是种美德,写点什么…
2012年9月7日 上午9:08 1层
@两个软件是从哪里下载的,为什么我找不到? 需要的话 mail或是加我qq我转发给你