2009/08/27

MySQL Connection 확인하기

Connection 상태 확인하기

/* Process List */
mysql> SHOW FULL PROCESSLIST;
+----+------+-----------------+-------------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------------+-------------+---------+------+-------+-----------------------+
| 65 | root | localhost:60206 | server | Sleep | 246 | | NULL |
| 67 | root | localhost:61278 | NULL | Query | 0 | NULL | SHOW FULL PROCESSLIST |
+----+------+-----------------+-------------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec)



Connection 수 확인하기

/* Connected thread count */
mysql> SHOW STATUS LIKE 'Threads_connected';
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_connected | 2 |
+-------------------+-------+
1 row in set (0.00 sec)




동작중인 Connection 수 확인하기

/* Running thread count */
mysql> SHOW STATUS LIKE 'Threads_running';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| Threads_running | 1 |
+-----------------+-------+
1 row in set (0.00 sec)

Original Post : http://neodreamer-dev.tistory.com/312

No comments :

Post a Comment