View the total number of nginx connections and connection status:
# Netstat-N | awk '/^ TCP/{++ s [$ NF]} end {for (a in S) print a, s [a]}'
Time_wait 17
Established 3254
Last_ack 236
Fin_wait_1 648
Fin_wait_2 581
Closing 7
Close_wait 4916
Description:
Closed // No connection is active or in progress
Listen // the server is waiting for the incoming call
Syn_recv // a connection request has arrived, waiting for confirmation
Syn_sent // The application has started. Open a connection.
Established // normal data transmission status/current number of concurrent connections
Fin_wait1 // The application says it has been completed
Fin_wait2 // the other side has agreed to release
Itmed_wait // wait until all groups die
Closing // both sides attempt to close at the same time
Time_wait // the other side has initialized a release
Last_ack // wait until all groups die
View the current MySQL connection:
1. view the details of all current connections:
./Mysqladmin-uadmin-p-h10.140.1.1 processlist
2. view only the current number of connections (threads is the number of connections .):
./Mysqladmin-uadmin-p-h10.140.1.1 status
Note: (account differentiation)
View the number of MySQL connections and the number of MySQL connections of the current user
Log on to the MySQL prompt as an administrator.
# Mysql-uroot-pxxxx
Mysql> show processlist; the first 100 connections can be displayed. show full processlist; all connections can be displayed. Simply put, if you log on with a common account, only this user is displayed. Note that the command has a semicolon.
If you want to view the settings of this server. # Vi/etc/My. CNF
Set-variable = max_user_connections = 30. This is the number of connections of a single user.
Set-variable = max_connections = 800 this is the global limit on the number of connections