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

How does apache check the current number of concurrency

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces apache how to check the current number of concurrency, has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

1. Check the current number of concurrent visits to apache:

Netstat-an | grep ESTABLISHED | wc-l

Compare the difference between the numbers of MaxClients in httpd.conf.

2. Check the number of processes:

Ps aux | grep httpd | wc-l

3. You can view the data using the following parameters:

Server-status?auto#ps-ef | grep httpd | wc-l1388

Count the number of httpd processes, and a series of requests will start a process to be used on the Apache server.

Indicates that Apache can handle 1388 concurrent requests, and this value Apache can be adjusted automatically according to the load.

# netstat-nat | grep-I "80" | wc-l4341

Netstat-an prints the current network link status of the system, while grep-I "80" is used to extract connections related to port 80, and wc-l counts the number of connections.

The final number returned is the total number of requests for all current ports 80.

# netstat-na | grep ESTABLISHED | wc-l376

Netstat-an prints the current network link status of the system, and grep ESTABLISHED extracts the information about the established connection. Then wc-l statistics.

The final number returned is the total number of established connections on all ports 80 currently.

Netstat-nat | | grep ESTABLISHED | wc-you can view the detailed records of all established connections

Check the number of concurrent requests for Apache and their TCP connection status:

Linux command:

Netstat-n | awk'/ ^ tcp/ {+ + S [$NF]} END {for (an in S) print a, S [a]} 'LAST_ACK 5SYN_RECV 30ESTABLISHED 1597FIN_WAIT1 51FIN_WAIT2 504TIME_WAIT 1057

Where:

SYN_RECV indicates the number of requests waiting to be processed

ESTABLISHED indicates normal data transfer status

TIME_WAIT indicates the number of requests that have been processed and waited for the timeout to end.

Thank you for reading this article carefully. I hope it is helpful for everyone to share how apache views the current concurrent content. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

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