Home > Article > Operation and Maintenance > How to check the current concurrent access volume of the server in Linux
The number of visitors to the server can be listed through the command: netstat -pnt | grep :80. For example, if you request a page on the server at this time, you can view the results through this command. The following ESTABLISHED indicates that the server is being accessed. You can add wc - l To count the quantity, the final command is: netstat -pnt | grep :80 | wc -l This command can count the number of requests for all URLs on the server.
Because the server itself occupies one connection, the number of concurrent user visits at this time is 7. Enter after closing the web page The command will find that there are still 8 users. In fact, the detailed information has changed from ESTABLISHED to FIN_WAIT2 timeout status, because http has a time to maintain the connection. After a while, the number of users will be 1, which means that all connections are All are completely disconnected. After accessing one page and then accessing another page, the previous http timeout will be accelerated, so when the website is visited continuously, the connection will remain stable overall.
The above is the detailed content of How to check the current concurrent access volume of the server in Linux. For more information, please follow other related articles on the PHP Chinese website!