zoukankan      html  css  js  c++  java
  • ab

    [root@ok ok]# ab -c 10 -n 100000000 http://www.zhirs.com/index.html
    #-c 10 表示并发用户数为10
    #-n 100000000 这行表示同时处理100000000个请求并运行10次index.html文件
    [root@app02 ~]# netstat -an|awk '/tcp/ {++S[$NF]}END{for (a in S)print a,S[a]}'
    TIME_WAIT 4058
    FIN_WAIT1 2
    ESTABLISHED 1
    SYN_RECV 2
    LISTEN 6
    [root@app02 ~]# free -h
                 total       used       free     shared    buffers     cached
    Mem:          237M       233M       4.1M       268K       5.8M       114M
    -/+ buffers/cache:       113M       124M 
    Swap:         991M       2.7M       989M 

    [root@ok 线下人员照片 - 副本]# for i in $(seq 10);do curl http://www.zhirs.com;done
    app02 ip:10.100.2.178
    app01 ip:10.100.2.177
    app01 ip:10.100.2.177
    app02 ip:10.100.2.178
    app01 ip:10.100.2.177
    app01 ip:10.100.2.177
    app01 ip:10.100.2.177
    app02 ip:10.100.2.178
    app02 ip:10.100.2.178
    app01 ip:10.100.2.177

     ab命令的包:

    yum install httpd-tools
    # rpm -ql httpd-tools
    /usr/bin/ab
    /usr/bin/htdbm
    /usr/bin/htdigest
    /usr/bin/htpasswd
    /usr/bin/httxt2dbm
    /usr/bin/logresolve
    /usr/share/doc/httpd-tools-2.4.6
    /usr/share/doc/httpd-tools-2.4.6/LICENSE
    /usr/share/doc/httpd-tools-2.4.6/NOTICE
    /usr/share/man/man1/ab.1.gz
    /usr/share/man/man1/htdbm.1.gz
    /usr/share/man/man1/htdigest.1.gz
    /usr/share/man/man1/htpasswd.1.gz
    /usr/share/man/man1/httxt2dbm.1.gz
    /usr/share/man/man1/logresolve.1.gz
  • 相关阅读:
    HDU-1115计算几何
    树形DP入门之HDU 1296
    拓扑排序-POJ1964
    其他一些数状数组的题
    HDU 2852(树状数组plus二分)
    POJ-2155二维树状数组
    HDOJ 1166 敌兵布阵 (线段树)
    codevs 1082 线段树练习3 (线段树)
    codevs 1081 线段树练习2 (线段树)
    codevs 1080 线段树练习(线段树)
  • 原文地址:https://www.cnblogs.com/bass6/p/6015707.html
Copyright © 2011-2022 走看看