In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In the plug-in module of Nginx, there is a module stub_status that can monitor some status information of Nginx. This module may not be installed by default, so you can add it when you compile manually.
1. Module installation
First use the command to see if the module has been installed:
The copy code is as follows: [root@ihxb123Z nginx] #. / nginx-V (V uppercase displays information such as version number and module, and v lowercase only shows version information.
If installed, the-- with-http_stub_status_module information is included in the information displayed. If you do not have this module, you need to reinstall it with the following compilation command:
. / configure-with-http_stub_status_module
2. Nginx configuration
After installation, you only need to modify the nginx configuration, as follows:
Location / hxbcdnstatus {stub_status on; access_log off; allow 127.0.0.1; deny all; # auth_basic "NginxStatus"; # auth_basic_user_file conf/nginxstaus;}
Here, there is only local access by default. If you can view remotely, you can add the relevant IP or simply remove the Deny all. Encrypted files can be created using the # htpasswd-c / usr/nginx/conf hxb command. The Nginx service needs to be restarted after configuration.
Status configuration can only be for a Nginx service. At present, Nginx is not able to monitor a single site.
3. Status View
After the configuration is completed, enter http://127.0.0.1/hxbcdnstatus in the browser to view, and the message is as follows:
Active connections: 100 server accepts handled requests 1075 1064 6253 Reading: 0 Writing: 5 Waiting: 95
4. Parameter description
Active connections-number of active connections
Server accepts handled requests-A total of 107520387 connections were processed, 107497834 handshakes were successfully created, and a total of 639121056 requests were processed
Each connection has three states: waiting, reading, and writing
Reading-the number of Header messages read from the client. This operation only reads the header information, and immediately enters the writing state after reading, so the time is very short.
Writing-the number of Header messages from the response data to the client. This operation not only reads the header, but also waits for the service response, so it takes a long time.
Waiting-A resident connection that waits for the next request instruction after opening keep-alive.
Under normal circumstances, the number of waiting is relatively large, which does not mean poor performance. On the contrary, if the number of reading+writing is large, it means that there is a problem with service concurrency.
Add:
Check the number of concurrent processes in Nginx: ps-ef | grep nginx | wc-l
Check the TCP connection status of Web server: netstat-n | awk'/ ^ tcp/ {+ + S [$NF]} END {for (an in S) print a, S [a]}'
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.