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
- #!/bin/bash
- FILE=nginx_status.txt
- echo -n > $FILE
- URL="*.*/status/"
- time=0
- while [[ $time -lt 100 ]]
- do
- datetime=`date`
- echo -n $datetime >> $FILE
- echo -n " --- " >> $FILE
- curl -s "$URL" |head -n 1 >> $FILE
- second=2
- sleep $second
- time=$[$time+$second]
- # let time=time+second
- echo $time
- done
阅读(1270) | 评论(0) | 转发(0) |