HOWTO USE linux disksim ssd model

http://www.huomo.cn/os/article-16cba.html

《How to install DiskSim 4.0 + SSDSim(MS) in Ubuntu》DiskSim isa low-level storage simulation tool, which can generatetiming-accurate simulation result. It is developed by Greg Ganger.Current version is 4.0 and it is out in June2008.
is an extensional module of DiskSim whichimplments SSD I/O Models. It is implemented by MicrosoftResearch.Compiling DiskSim and SSD extension is very simple, but when Itried, there was some problem.
This article addresses those problems.
DiskSim does not compile in 64bit environment. Nevertry it. Even if you succeded compilation, it will not run -- justproduces segmentation fault.
DiskSim requires bison and flex, which are parser generators forparameter file parsing codes.Step 0. Install bison and flex, if you have not installedalready.
$ sudo apt-get install bison flexStep 1. Download and unzip.
Sources can be downloadedfrom the links above. I downloaded DiskSim 4.0 with dixtrac.
$ tar xfz disksim-4.0-with-dixtrac.tar.gz
$ cd disksim-4.0
$ unzip ../ssd-add-on.zipStep 2. Apply SSD add on patch.
$ patch -p1 < ssdmodel/ssd-patchStep 3. Append SSD model library path to dixtrac.
add these lines to dixtrac/.paths
# path tossdmodel
exportSSDMODEL_PREFIX=../ssdmodel
exportSSDMODEL_INCL=$(SSDMODEL_PREFIX)/include
exportSSDMODEL_CFLAGS=-I$(SSDMODEL_INCL)
exportSSDMODEL_LDPATH=$(SSDMODEL_PREFIX)/lib
exportSSDMODEL_LDFLAGS=-L$(SSDMODEL_LDPATH)-lssdmodel
modify dixtrac/Makefile like this :
$(LIBDISKSIM_LDFLAGS) \
$(MEMSMODEL_LDFLAGS) \
$(DISKMODEL_LDFLAGS) \
$(SSDMODEL_LDFLAGS) \
$(LIBPARAM_LDFLAGS) \
$(LIBDDBG_LDFLAGS) \
$(ST_LDFLAGS)CFLAGS = -Wall -g -MD -I. $(DEFINES) -I$(STHREADS) $(DMINCLUDES)\
$(LIBDISKSIM_CFLAGS) \
$(DISKMODEL_CFLAGS) $(LIBPARAM_CFLAGS) $(LIBDDBG_CFLAGS) \
$(SSDMODEL_CFLAGS)
Step 4. Compile~~~!
$ makeStep 5. Check if it works well.
$ cd valid;./runvalid
$ chmod a+x ../ssdmodel/valid/runvalid
$ cd ../ssdmodel/valid; ./runvalidOk. It is all.《Install the DiskSim4.0 on Ubuntu 10.04》First , I would tell you guys , the disksim only support the 32bitsOS!
when you get the disksim-4.0.tar.gz from thehttp://pdl.com/disksim-4.01.tar xvf disksim-4.0.tar.gz,you'll get a directory nameddisksim-4.02.install the disksim-4.0
 0.you should install the bison and flex first by ""sudo apt-getinstall bison flex" .  1. "sudo make" the top-leveldirectory.  2."sudo make install" then.  3. "cd" to the subdirectory called"valid".  3. type "sudo./runvalid".  This will execute thesimulator a number of times, using
    sample configurations and workloads.  Amongthem are example validation
    experiments for a number of different SCSI diskdrives.  To
    verify that things are working correctly, compare the result
    values from each execution to the expected value (provided onthe
    preceding line), which is rounded.3.then now ,welcome to the disksim lands! you can run the disksim,congratulations!4."cd src subdirectory",run the disksim by
    disksim <parfile><outfile><tracetype><tracefile><synthgen> [ par overridewhere:
• disksim is the name of the executable.
• parfile is the name of the parameter file (whose format isdescribed in chapter 3).
• outfile is the name of the output file (whose format is describedin chapter 5). Output can
be directed to stdout by specifying “stdout” for thisargument.
• tracetype identifies the format of the trace input, if any(options are described in chapter C).
• tracefile identifies the trace file to be used as input. Input istaken from stdin when “stdin”
is specified for this argument.
• synthgen determines whether or not the synthetic workloadgeneration portion of the sim-
ulator should be enabled (any value other than “0” enablessynthetic workload generation).
The synthetic generator(s) are configured by values in theparameter file, as described in
chapter C. Currently, DiskSim cannot use both an input trace and aninternally-generated
synthetic workload at the same time.
• par override allows default parameter values or parameter valuesfrom parfile to be
replaced by values specified in the command line. The exact syntaxis described in the
following section.
5.so!begin the journal!

make时可能遇到的问题:

“undefined reference to "sqrt"”等数学函数 ,解决方法,将 src, dixtrac, memsmodel 目录下的Makefile文件中的 LDFLAGS 中的 -lm 放在最后即可。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值