亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Linux中安裝使用http_load對(duì)服務(wù)器進(jìn)行壓力測(cè)試的教程

Linux運(yùn)維日志   發(fā)布時(shí)間:2016-04-26 10:50:03   作者:朱茂海   我要評(píng)論
這篇文章主要介紹了Linux中安裝使用http_load對(duì)服務(wù)器進(jìn)行壓力測(cè)試的教程,http_load可以簡(jiǎn)單地通過(guò)txt文本文件中記錄的參數(shù)來(lái)對(duì)HTTP服務(wù)器進(jìn)行壓力測(cè)試,需要的朋友可以參考下

http_load基于linux平臺(tái)的一種性能測(cè)工具。以并行復(fù)用的方式運(yùn)行,用以測(cè)試web服務(wù)器的吞吐量與負(fù)載,測(cè)試web頁(yè)面的性能。

1、下載
官方網(wǎng)站:http://acme.com/software/http_load/

復(fù)制代碼
代碼如下:

cd /root
wget http://acme.com/software/http_load/http_load-12mar2006.tar.gz
tar xzf http_load-12mar2006.tar.gz

2、安裝

復(fù)制代碼
代碼如下:

cd http_load-12mar2006
make

執(zhí)行完make,會(huì)在當(dāng)前目錄生成一個(gè)http_load二進(jìn)制文件。

3、使用方法

復(fù)制代碼
代碼如下:

root@www:~/http_load-12mar2006# ./http_load --help
usage: ./http_load [-checksum] [-throttle] [-proxy host:port] [-verbose] [-timeout secs] [-sip sip_file]
-parallel N | -rate N [-jitter]
-fetches N | -seconds N
url_file
One start specifier, either -parallel or -rate, is required.
One end specifier, either -fetches or -seconds, is required.

主要參數(shù)說(shuō)明:
-parallel 簡(jiǎn)寫(xiě)-p :含義是并發(fā)的用戶(hù)進(jìn)程數(shù)。
-rate 簡(jiǎn)寫(xiě)-r :含義是每秒的訪(fǎng)問(wèn)頻率
-fetches 簡(jiǎn)寫(xiě)-f :含義是總計(jì)的訪(fǎng)問(wèn)次數(shù)
-seconds簡(jiǎn)寫(xiě)-s :含義是總計(jì)的訪(fǎng)問(wèn)時(shí)間
選擇參數(shù)時(shí),-parallel和-rate選其中一個(gè),-fetches和-seconds選其中一個(gè)。

4、示例:

復(fù)制代碼
代碼如下:

http_load -parallel 50 -s 10 urls.txt

這段命令行是同時(shí)使用50個(gè)進(jìn)程,隨機(jī)訪(fǎng)問(wèn)urls.txt中的網(wǎng)址列表,總共訪(fǎng)問(wèn)10秒。

復(fù)制代碼
代碼如下:

http_load -rate 50 -f 5000 urls.txt

每秒請(qǐng)求50次,總共請(qǐng)求5000次停止。

測(cè)試網(wǎng)站每秒所能承受的平均訪(fǎng)問(wèn)量:

復(fù)制代碼
代碼如下:

http_load -parallel 5-fetches 1000urls.txt

這段命令行是同時(shí)使用5個(gè)進(jìn)程,隨機(jī)訪(fǎng)問(wèn)urls.txt中的網(wǎng)址列表,總共訪(fǎng)問(wèn)1000次。運(yùn)行之后的結(jié)果:
1000 fetches, 5 max parallel, 6e+06 bytes, in 58.1026 seconds
6000 mean bytes/connection
17.2109 fetches/sec, 103266 bytes/sec
msecs/connect: 0.403263 mean, 68.603 max, 0.194 min
msecs/first-response: 284.133 mean, 5410.13 max, 55.735 min
HTTP response codes:
code 200 — 1000
從上面的運(yùn)行結(jié)果來(lái)看,目標(biāo)網(wǎng)站僅僅能夠承受每秒17次訪(fǎng)問(wèn),不夠強(qiáng)壯。

相關(guān)文章

最新評(píng)論