Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation of nginx Statistics Module and how to use ab tool to stress Test nginx

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

The installation of nginx statistics module and how to use ab tool to stress test nginx. In view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

1. After httpd is installed, there will be an ab execution program in the bin directory.

2. / Data/apps/httpd/bin/ab-n 5000-c 1000 http://127.0.0.1/index.html

The-n option represents the total request-c represents the number of concurrency

3. Install the nginx statistics module

A. Stop nginx.

B, / Data/apps/nginx/sbin/nginx-V check the original compilation options (if you don't have nginx installed, you don't need this step, just install it)

C. Compile options plus-- with-http_stub_status_module make & & make install

D, nginx configuration

Server {

Listen 7000

Server_name 47.93.5.10

Location / status {

Stub_status on

Access_log off

Allow 127.0.0.1; # allows access to the ip of the statistics page

}

}

Reload the nginx configuration

4. Visit the statistics page 127.0.0.1:7000/status. At this time, you can use the ab test tool to sit and observe the information on the statistics page.

This is the answer to the question about the installation of the nginx statistics module and how to use the ab tool to stress test nginx. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report