Chinaunix首页 | 论坛 | 博客
  • 博客访问: 617087
  • 博文数量: 73
  • 博客积分: 1813
  • 博客等级: 上尉
  • 技术积分: 1213
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-27 19:59
文章分类
文章存档

2013年(1)

2012年(12)

2011年(28)

2010年(31)

2009年(1)

我的朋友

分类: Python/Ruby

2012-03-15 17:03:30

nginx是可以支持10W并发量的,下面是一段观察nginx并发的脚本,前提是一定要安装并配置了nginx的http_stub_status_module模块。

安装如下:./configure --user=www --group=www --prefix=/usr/local/webserver/nginx/ --with-http_flv_module --with-http_stub_status_module   --with-openssl=/usr/local/openssl 
  1. #!/bin/bash
  2. FILE=nginx_status.txt
  3. echo -n > $FILE
  4. URL="*.*/status/"
  5. time=0
  6. while [[ $time -lt 100 ]]
  7. do
  8. datetime=`date`
  9. echo -n $datetime >> $FILE
  10. echo -n " --- " >> $FILE
  11. curl -s "$URL" |head -n 1 >> $FILE
  12. second=2
  13. sleep $second
  14. time=$[$time+$second]
  15. # let time=time+second
  16. echo $time
  17. done
阅读(1247) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~