読者です 読者をやめる 読者になる 読者になる

MySQL SHOW STATUS - 接続数を確認する

コマンド

$ mysql -uroot -e 'show status' | grep -E 'Max|Threads'
Max_used_connections    12
Threads_cached  0
Threads_connected       1
Threads_created 13280
Threads_running 1

Max_used_connections

The maximum number of connections that have been in use simultaneously since the server started.

Threads_cached

The number of threads in the thread cache.

Threads_connected

The number of currently open connections.

Threads_created

The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. The cache miss rate can be calculated as Threads_created/Connections.

Threads_running

The number of threads that are not sleeping.

http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html