linux下压力测试命令ab

  ab命令被集成到了httpd服务器中,所以想要使用ab命令需要先安装httpd服务。yum -y install httpd

ab命令的使用方法和常用选项

ab [选项] [http[s]://]hostname[:port]/path

常用选项:

  -n requests     在测试会话中所执行的请求总个数,默认一个

  -c concurrency  一次产生的请求个数,默认一个

  测试会话总共产生1000个请求,一次生成,压力测试

  [root@youxi2 ~]# ab -n 1000 -c 1000 http://192.168.5.102/index.html

posted @ 2020-01-07 00:15  大爷灰  阅读(622)  评论(0编辑  收藏  举报