鲲鹏社区首页
中文
注册
开发者
我要评分
获取效率
正确性
完整性
易理解
在线提单
论坛求助

perftest工具源码编译

Oracle Linux Server 9.0操作系统的perftest打流工具编译安装步骤。

  1. 安装编译perftest工具依赖的包。
    yum install pciutils-devel
  2. 配置代理后下载perftest源码。
    wget https://github.com/linux-rdma/perftest/archive/refs/tags/v4.4-0.7.tar.gz --no-check-certificate
  3. 解压并进入perftest目录。
    tar -zxf v4.4-0.7.tar.gz
    cd perftest-4.4-0.7/
  4. 执行脚本。
    [root@localhost perftest]# ./autogen.sh
    libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
    libtoolize:	copying	file 'config/ltmain.sh'
    libtoolize:	putting macros in AC_CONFIG_MACRO_DIRS, 'm4'
    libtoolize:	copying	file 'm4/libtool.m4'
    libtoolize:	copying file 'm4/ltoptions.m4'
    libtoolize:	copying	file 'm4/ltsugar.m4'
    libtoolize:	copying	file 'm4/ltversion.m4'
    libtoolize:	copying file 'm4/lt~obsolete.m4'
    libtoolize: 'AC_PROG_RANLIB' is rendered obsolete by 'LT_INIT'
    configure.ac:55: installing config/compile'
    configure.ac:36: installing 'config/missing'
    Makefile.am: installing 'config/depcomp'
  5. 生成编译配置
    [root@localhost perftest]# ./configure
    Checking for efadv_create_qp_ex in -lefa... no
    checking for mlx5dv_create_qp in -lmlx5... yes
    checking for hnsdv_query_device in -lhns... no
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status:	creating Makefile
    config.status:	creating config.h
    config.status:	executing depfiles commands
    config.status:	executing libtool commands
    config.status:	executing man commands
  6. 编译perftest。
    [root@localhost perftest]# make
      CCLD       raw_ethernet_fs_rate
    ln -s	.././man/perftest.1 man/ib_write_bw.1
    ln -s	.././man/perftest.1 man/ib_read_bw.1
    ln -s	.././man/perftest.1 man/ib_send_bw.1
    ln -s	.././man/perftest.1 man/ib_atomic_bw.1
    ln -s	.././man/perftest.1 man/ib_write_lat.1
    ln -s	.././man/perftest.1 man/ib_read_lat.1
    ln -s	.././man/perftest.1 man/ib_send_lat.1
    ln -s	.././man/perftest.1 man/ib_atomic_lat.1
    ln -s	.././man/perftest.1 man/raw_ethernet_bw.1
    ln -s	.././man/perftest.1 man/raw_ethernet_lat.1 
    ln -s	.././man/perftest.1 man/raw_ethernet_burst_lat.1
    ln -s   .././man/perftest.1 man/raw_ethernet fs rate.1

    如果打印错误信息:

    /usr/bin/ld: libperftest.a(raw_ethernet_resources.o):/xxx/perftest-4.4-0.7/src/raw_ethernet_resources.c:58: multiple definition of `duration_param'; libperftest.a(perftest_resources.o):/xxx/perftest-4.4-0.7/src/perftest_resources.c:37: first defined here
    collect2: error: ld returned 1 exit status
    make[1]: *** [Makefile:724: ib_send_bw] Error 1
    make[1]: Leaving directory '/home/perftest/perftest-4.4-0.7'
    make: *** [Makefile:568: all] Error 2

    请将src/raw_ethernet_resources.c文件58行:

    struct perftest_parameters* duration_param;

    修改为:

    extern struct perftest_parameters* duration_param;
  7. 安装perftest。
    [root@localhost perftest]# make install
    libtool: install: /usr/bin/install -c raw_ethernet_fs_rate /usr/bin/raw_ethernet_fs_rate
     /usr/bin/mkdir -p '/usr/bin'
     /usr/bin/install -c run_perftest_loopback run_perftest multi devices '/usr/bin'
     /usr/bin/mkdir -p '/usr/share/man/man1'
     /usr/bin/install -C -m 644 ./man/ib_write_bw.1 ./man/ib_read_bw.1 ./man/ib_send_bw.1 ./man/ib_atomic_bw.1 ./man/ib_write_lat.1 ./man/ib_read_lat.1 ./man/ib...send_lat.1 ./man/ib_atomic_lat.1 ./man/raw_ethernet_bw.1 ./man/raw_ethernet_lat.1 ./man/raw_ethernet_burst_lat.1 ./man/raw_ethernet_fs_rate.1 man/perftest.
     1 '/usr/share/man/man1'
  8. 执行下面命令,打印Version: 5.60,即表示安装成功。
    ib_send_bw --version