当前位置: 首页 > 工具软件 > AutoBench > 使用案例 >

httperf、autobench安装、使用

逄嘉木
2023-12-01

以下所有实现方式均在windows系统上,使用Cygwin模拟UNIX环境。

【安装Cygwin】

在开始前,需要安装cygwin,并更新安装所需要的包,至少需要安装以下包:

autoconf2.1

automake1.10

binutils

gcc-core

gcc4-core

gdb

pcre

pcre-devel

【安装wget】

  • 访问 http://ftp.gnu.org/gnu/wget/wget-1.11.4.tar.gz 下载 GNU wget 实用程序的最新源代码
  • 进入本地wget压缩包所在目录,编译安装wget:
  • $ tar xzvf wget-11.4.tar
    $ cd wget-1.11.4
    $ ./configure
    configure: Configuring for GNU wget 1.11.4
    ...
    creating po/Makefile
    $ make
    gcc -I. ...
    $ make install
    ...
    /usr/bin/install -c -m 644 ./wget.1 /usr/local/share/man/man1/wget.1
    $ type wget
    /usr/local/bin/wget

【httperf】

  • 执行如下命令下载、编译、安装httperf:
  • $ wget ftp://ftp.hpl.hp.com/pub/httperf/httperf-0.9.0.tar.gz  (使用wget命令下载httperf压缩包)
        
        

    $ tar zxvf httperf-0.9.0.tar.gz  $ cd httperf-0.9.0  $ ./configure --prefix=/usr/local/httperf $ make && make install
  • httperf下载地址:ftp://ftp.hpl.hp.com/pub/httperf/ 
  • httperf手册下载地址:http://www.hpl.hp.com/research/linux/httperf/httperf-man-0.9.pdf

【Autobench】

【使用过程中遇到的问题总结】

  • 执行httperf遇到错误码,查看错误码对应的内容:  grep 105 /usr/include/*/*errno*
  • 使用bench2png转换autobench生成的数据文件为图片时,出现如下错误:
gnuplot: unable to open display ''
gnuplot: X11 aborted.
解决方案:
The bug is that on linux systems the default terminal is X11,regardless of whether you actually have x11 installed.

To fix it permanently, set an environmental variable on thismachine to change the default terminal to something else.
For example:
tcsh:
  setenv GNUTERM dumb
bash:
  export GNUTERM=dumb
Reference: http://objectmix.com/graphics/140220-gnuplot-generates-display-error-when-generating-png.html
但是这样修改之后可以生成图片,但是生成的图片在打开时出现:图片已损坏的错误
  • gnuplot-4.4/5.0,执行set terminal png,出现如下错误:
Terminal type set to 'png'
fontconfig: Couldn't find font. when opening font "arial", using internal non-scalable font
Options are 'nocrop medium size 640,480 '

解决方案:

cmd > export GDFONTPATH="/cygdrive/C/WINDOWS/Fonts"
Reference:http://cygwin.1069669.n5.nabble.com/Fonts-td118120.html


 类似资料: