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
  • 相关阅读:
    10. Regular Expression Matching
    9. Palindrome Number
    6. ZigZag Conversion
    5. Longest Palindromic Substring
    4. Median of Two Sorted Arrays
    3. Longest Substring Without Repeating Characters
    2. Add Two Numbers
    链式表的按序号查找
    可持久化线段树——区间更新hdu4348
    主席树——树链上第k大spoj COT
  • 原文地址:https://www.cnblogs.com/bass6/p/6015707.html
Copyright © 2011-2022 走看看