zoukankan      html  css  js  c++  java
  • ltp-ddt eth_parallel_processing

    ETH_S_FUNC_PARALLEL_PROCESSING:

    source 'common.sh';

    prepare_nfs_mount.sh "/mnt/nfs_mount"|| die "Mounting NFS Failed";

    multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING # dd if=/dev/urandom of=/mnt/nfs_mount/dd_test bs=1M count=100" -l "-n 2 -a 0x1 -d 1";

    unmount_nfs.sh "/mnt/nfs_mount"

    prepare_nfs_mount.sh:

    source "common.sh"  # Import do_cmd(), die() and other functions
    if [ -n "$1" ]
    then
      mount_point=$1
      `check_env_var 'NFS_SERVER'`
      `check_env_var 'NFS_ROOT_PATH'`
      mkdir -p $mount_point
      umount $mount_point
      mount -t nfs -o nolock,addr=$NFS_SERVER $NFS_SERVER':'$NFS_ROOT_PATH $mount_point
    else
        die "NFS mount point needs to be provided as parameter to script"
    fi

    check_env_var in common.sh 看看是否存在这个环境变量

    check_env_var() {                                               
      output_str=`env|grep $1`                            
      if [ ${#output_str} == 0 ]
      then                                                           
        die "$1 not defined"                                             
      fi                                                              
    }

    所以需要定义NFS_SERVER和NFS_ROOT_PATH,可以放在env_tools.sh(自己编的一个脚本在目录E:3_Work32_PSOC321_LxT oolsinary_psoc_server)中

    export NFS_SERVER=192.168.40.41
    export NFS_ROOT_PATH=/home/zhangyi/work/psoc_ltp/ltp_mnt

    mount -t nfs -o nolock,addr=$NFS_SERVER $NFS_SERVER':'$NFS_ROOT_PATH $mount_point

    挂接有问题,改为

    mount -t nfs -o nolock,addr=$NFS_SERVER,nfsvers=3,vers=3 $NFS_SERVER':'$NFS_ROOT_PATH $mount_point

    multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING # dd if=/dev/urandom of=/mnt/nfs_mount/dd_test bs=1M count=100" -l "-n 2 -a 0x1 -d 1";

    # usage:
    # multi_run_processes.sh <process list> [<process list2> ...] -v
    #   where        -v is an optional flag and when present indicates that priority
    #                 of two processes has to be verified using time taken
    #                 for process execution
    #
    #                 process_list= -s "#-separated commands" -l "-n <num_instances>
    #                        -a <cpu affinity mask> -d <inter-process start delay>
    #                        -p <priority> -r <realtime priority>"

    -s "#-separated commands"  #命令

    -n <num_instances>. #跑几个process

    -a <cpu affinity mask>

  • 相关阅读:
    2、从0开始学算法 时间/空间复杂度(如何知道你的代码性能如何?)
    1、从0开始学算法 概述
    机器学习(五):通俗易懂决策树与随机森林及代码实践
    机器学习(四):通俗理解支持向量机SVM及代码实践
    机器学习(三):理解逻辑回归及二分类、多分类代码实践
    HDU 2492 Ping pong (树状数组)
    yum更新失败
    webpack3配置rules的问题
    置顶帖汇总
    2021.07.03软件更新公告
  • 原文地址:https://www.cnblogs.com/idyllcheung/p/10815480.html
Copyright © 2011-2022 走看看