zoukankan      html  css  js  c++  java
  • siege4压测脚本示例

    agent="Siege 1.0"
    rcconfig="/opt/siege4.0/etc/siegerc"
    concurrent=$1
    repet=$2
    url="/opt/siege4.0/etc/$3"

    for runTime in `seq 1 $repet`
    do
    if(($4==1))
    then
    `nohup /opt/siege4.0/bin/siege -c $concurrent -r $repet -i -b -f $url -R $rcconfig -A "$agent" >/dev/null &`
    echo $runTime
    else
    /opt/siege4.0/bin/siege -c $concurrent -r $repet -i -b -f $url -R $rcconfig -A "$agent" &
    echo $runTime
    fi
    done

    vconfig="/opt/siege4.0/etc/siegerc"
    vtoken=""
    vtype="content-type:application/x-www-form-urlencoded;charset=utf-8"
    vagent=""
    vrequestUrls=$1
    vprocessNumbers=$2
    vconcurrentNumbers=$1
    vrunTimes=$3
    vflag=$4

    for pn in `seq 1 $vprocessNumbers`
    do
    if(($vflag==1))
    then
    `nohup /opt/siege4/bin/siege -c $vconcurrentNumbers -t $vrunTimes -b -H $vtoken -T $vtype -A $vagent -f $vrequestUrls -R $vconfig >/dev/null &`
    #echo $runTime
    else
    /opt/siege4/bin/siege -c $vconcurrentNumbers -t $vrunTimes -b -H $vtoken -T $vtype -A $vagent -f $vrequestUrls -R $vconfig &
    #echo $runTime
    fi
    done

  • 相关阅读:
    lnmp之php5.6.29安装
    lnmp之mysql5.5.17安装
    利用xshell从windows上传文件到虚拟机
    linux命令
    tp中ueditor编辑器的使用
    Thinkphp 3.2.2 验证码check_verify方法,只能验证一次
    选学霸
    低价购买
    友好城市
    榨取kkksc03
  • 原文地址:https://www.cnblogs.com/NiceTime/p/8567689.html
Copyright © 2011-2022 走看看