# mysqladmin -u root -p extended-status |egrep '(Max|Threads_)'
Enter password:
| Max_used_connections | 983 |
| Threads_cached | 6 |
| Threads_connected | 792 |
| Threads_created | 1412901 |
| Threads_running | 1 |
MariaDB [(none)]> show status like '%connect%';
+-----------------------------------------------+--------+
| Variable_name | Value |
+-----------------------------------------------+--------+
| Aborted_connects | 0 |
| Connection_errors_accept | 0 |
| Connection_errors_internal | 0 |
| Connection_errors_max_connections | 0 |
| Connection_errors_peer_address | 0 |
| Connection_errors_select | 0 |
| Connection_errors_tcpwrap | 0 |
| Connections | 278195 |
| Max_used_connections | 910 |
| Performance_schema_session_connect_attrs_lost | 0 |
| Slave_connections | 0 |
| Slaves_connected | 0 |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_finished_connects | 0 |
| Threads_connected | 773 |
+-----------------------------------------------+--------+
16 rows in set (0.01 sec)
Max_used_connections : 지금까지 기록된 동시 연결 최대 수
Threads_cached :
Threads_connected : 현재 열려있는 연결 수
Threads_created : 연결을 처리하기 위해 생성된 스레드
Threads_running : 작동중인 스레드
계산식
Cache Miss Rate(%) = (Threads_created / Connections) * 100
Connection Miss Rate(%) = (Aborted_connects / Connections) * 100
Connection Usage(%) = (Threads_connected / max_connections) * 100
참고