linux下安裝ab壓力測試工具及ab命令詳解

2021-08-29 07:20:56 字數 1901 閱讀 3498

ab -v 檢視ab版本

ab –help

ab -n1000 -c 10以上命令-n訪問1000次, -c併發10個

ab壓力測試返回報文內容詳解:

server software:        apache          #伺服器軟體

server hostname: www.91cnm.com #網域名稱

server port: 80 #請求埠號

document path: / #檔案路徑

document length: 40888 bytes #頁面位元組數

concurrency level: 10 #請求的併發數

time taken for tests: 27.300 seconds #總訪問時間

complete requests: 1000 #請求成功數量

failed requests: 0 #請求失敗數量

write errors: 0

total transferred: 41054242 bytes #請求總資料大小(包括header頭資訊)

html transferred: 40888000 bytes #html頁面實際總位元組數

requests per second: 36.63 [#/sec] (mean) #每秒多少請求,這個是非常重要的引數數值,伺服器的吞吐量

time per request: 272.998 [ms] (mean) #使用者平均請求等待時間

time per request: 27.300 [ms] (mean, across all concurrent requests)

# 伺服器平均處理時間,也就是伺服器吞吐量的倒數

transfer rate: 1468.58 [kbytes/sec] received #每秒獲取的資料長度

connection times (ms)

min mean[+/-sd] median max

connect: 43 47 2.4 47 53

processing: 189 224 40.7 215 895

waiting: 102 128 38.6 118 794

total: 233 270 41.3 263 945

percentage of the requests served within a certain time (ms)

50% 263 #50%使用者請求在263ms內返回

66% 271 #66%使用者請求在271ms內返回

75% 279 #75%使用者請求在279ms內返回

80% 285 #80%使用者請求在285ms內返回

90% 303 #90%使用者請求在303ms內返回

95% 320 #95%使用者請求在320ms內返回

98% 341 #98%使用者請求在341ms內返回

99% 373 #99%使用者請求在373ms內返回

100% 945 (longest request)

---------------------

原文:

linux下安裝ab壓力測試工具及ab命令詳解

ab v 檢視ab版本 ab help ab n1000 c 10 是我的小 掛在虛擬主機上的 n訪問1000次,c併發10個 ab壓力測試返回報文內容詳解 server software apache 伺服器軟體 server hostname www.buruyouni.com 網域名稱 ser...

linux 下ab壓力測試

linux 下ab壓力測試 1.ab的簡介 ab是apachebench命令的縮寫。ab是apache自帶的壓力測試工具。ab非常實用,它不僅可以對apache伺服器進行 訪問壓力測試,也可以對或其它型別的伺服器進行壓力測試。比如nginx tomcat iis等 2.ab的原理 ab的原理 ab命...

ab壓力測試工具

即ab的主要邏輯包含在test方法中。test方法首先進行了一些全域性的初始化工作。其中,最重要的乙個資料結構是陣列struct connection con c 代表同時存在的c個客戶端連線。struct connection的結構如下 struct connection start connec...