麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > Apache > 正文

使用Apache ab工具對Apache服務器進行簡單的壓力測試

2024-08-27 18:27:21
字體:
來源:轉載
供稿:網友

1.安裝ab命令

sudo apt-get install apache2-utils 

2.ab命令參數說明

Usage: ab [options] [http[s]://]hostname[:port]/path 
Options are:  
  

//總的請求數  -n requests Number of requests to perform  //一次同時并發的請求數 總的請求數(n)=次數*一次并發數(c)  -c concurrency Number of multiple requests to make 

-n requests Number of requests to perform
//在測試會話中所執行的請求個數(本次測試總共要訪問頁面的次數)。默認時,僅執行一個請求。
-c concurrency Number of multiple requests to make
//一次產生的請求個數(并發數)。默認是一次一個。
-t timelimit Seconds to max. wait for responses
//測試所進行的最大秒數。其內部隱含值是-n 50000。它可以使對服務器的測試限制在一個固定的總時間以內。默認時,沒有時間限制。
-p postfile File containing data to POST
//包含了需要POST的數據的文件,文件格式如“p1=1&p2=2”.使用方法是 -p 111.txt 。 (配合-T)
-T content-type Content-type header for POSTing
//POST數據所使用的Content-type頭信息,如 -T “application/x-www-form-urlencoded” 。 (配合-p)
-v verbosity How much troubleshooting info to print
//設置顯示信息的詳細程度 – 4或更大值會顯示頭信息, 3或更大值可以顯示響應代碼(404, 200等), 2或更大值可以顯示警告和其他信息。 -V 顯示版本號并退出。
-w Print out results in HTML tables
//以HTML表的格式輸出結果。默認時,它是白色背景的兩列寬度的一張表。
-i Use HEAD instead of GET
// 執行HEAD請求,而不是GET。
-x attributes String to insert as table attributes
-y attributes String to insert as tr attributes
-z attributes String to insert as td or th attributes
-C attribute Add cookie, eg. -C “c1=1234,c2=2,c3=3″ (repeatable)
//-C cookie-name=value 對請求附加一個Cookie:行。 其典型形式是name=value的一個參數對。此參數可以重復,用逗號分割。
提示:可以借助session實現原理傳遞 JSESSIONID參數, 實現保持會話的功能,如
-C ” c1=1234,c2=2,c3=3, JSESSIONID=FF056CD16DA9D71CB131C1D56F0319F8″ 。
-H attribute Add Arbitrary header line, eg. ‘Accept-Encoding: gzip' Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
//-P proxy-auth-username:password 對一個中轉代理提供BASIC認證信任。用戶名和密碼由一個:隔開,并以base64編碼形式發送。無論服務器是否需要(即, 是否發送了401認證需求代碼),此字符串都會被發送。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 男女羞羞视频在线观看免费 | av成人免费在线观看 | 福利在线国产 | 成人黄视频在线观看 | 91一区二区在线观看 | 一级国产航空美女毛片内谢 | 成人精品一区二区三区中文字幕 | 狠狠干天天操 | 国产精品久久久久久久亚洲按摩 | 免费专区 - 91爱爱 | 欧美日本免费一区二区三区 | 毛片免费在线 | 精品一区二区久久久久 | 中文字幕免费播放 | 国产91在线播放九色 | 369看片你懂的小视频在线观看 | 久久视讯 | 国产亚洲精品视频中文字幕 | 免费国产一区二区视频 | 中文字幕一区在线观看视频 | 欧美18—19sex性护士中国 | 国产成人在线观看免费网站 | 欧美一级α | 69av导航 | 黄视频网址 | 久久久www成人免费精品 | 亚洲精品午夜国产va久久成人 | av在线免费看片 | 羞羞的视频在线观看 | 91久久国产综合精品女同国语 | 日本中文字幕电影在线观看 | 中文字幕网在线 | 中文字幕综合在线观看 | 日韩中文字幕三区 | 自拍偷拍亚洲图片 | 九色免费视频 | 亚洲精品成人在线视频 | 亚洲午夜在线观看 | 视频一区 日韩 | 色网站综合 | 911视频免费版 |