需根据自己的环境修改相应的值
cat testiscsi.sh #!/bin/bash workd=‘/home/vdbench050406‘ sdnum=1 hdnum=1 threadnum=8 seekpct=100 rdpct=70 xfersize=8k iorate=max elapse=68400 maxdata=1000g interval=5 name=multihost-${xfersize}-${seekpct}.file echo "hd=default,vdbench=${workd},user=root,shell=ssh" >> ${name} echo "hd=hd1,system=" >>${name} echo "hd=hd2,system=" >>${name} #echo "hd=hd3,system=" >>${name} #echo "hd=hd4,system=" >>${name} #echo "hd=hd5,system=" >>${name} #echo "hd=hd6,system=" >>${name} for dev in $(ls -l /dev/disk/by-path/ |grep iscsi|awk ‘{print $9}‘) do echo "sd=sd${sdnum},hd=hd${hdnum},lun=/dev/disk/by-path/${dev},openflags=o_direct,threads=${threadnum}" >>${name} ((sdnum=sdnum+1)) done echo "wd=wd1,sd=sd*,seekpct=${seekpct},rdpct=${rdpct},xfersize=${xfersize}" >>${name} echo "rd=rd1,wd=wd*,iorate=${iorate},elapse=${elapse},maxdata=${maxdata},interval=${interval},warmup=30" >>${name}
本文出自 “小叶” 博客,请务必保留此出处http://muyuluo.blog.51cto.com/3246561/1982432
原文地址:http://muyuluo.blog.51cto.com/3246561/1982432