티스토리 뷰
[Oracle] MYSQL 점검하기
- Connection Usage(%)
Connection Usage(%) = Threads_connected(현재 연결된 Thread 수) / max_connections(최대 동시 접속 가능 수) * 100
mysql> show variables like '%max_connection%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections| 100 |
+-----------------+-------+
1 row in set (0.00 sec)
mysql> show status like '%connect%';
+----------------------+---------+
| Variable_name | Value |
+----------------------+---------+
| Aborted_connects | |
| Connections | |
| Max_used_connections | |
| Threads_connected | |
+----------------------+---------+
4 rows in set (0.01 sec)
- Connection Miss Rate(%)
Connection Miss Rate(%) = Aborted_connects(MySQL 서버에 접속이 실패된 수) / Connections * 100
mysql> show status like '%clients%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| Aborted_clients | |
+-----------------+-------+
1 row in set (0.00 sec)
mysql> show status like '%Connections%';
- Cache Miss Rate(%)
- Connection Health
mysql> Show status like 'threads_connected';
Traffic (Min : 0, MAX : 65.345)
mysql> Show status like 'bytes_sent';
Number of SQL Queries (Min : 0, MAX : 24)
mysql> Show status like 'com_select';
- Query Cache hit rate
Query Cache hit rate = Qcache_hits / (Qcache_hits + Qcache_inserts) * 100
mysql> Show status like '%Qcache%;
- Key reads rate(%)
Key_read / Key_read_requests * 100
mysql> Show status like '%Key%;
- Table 사용량 Check
DB 사용량 :
SQL> SELECT table_schema "Database Name", SUM(data_length+index_length)/1024/1024 "Database Size (MB)"
2> FROM information_schema.TABLES
3> GROUP BY table_schema;
Table 사용량 :
SQL>SELECT concat( table_schema, '.', table_name ) table_name,
2>concat( round( data_length / ( 1024 *1024 ) , 2 ) , 'M' ) data_length,
3>concat( round( index_length / ( 1024 *1024 ) , 2 ) , 'M' ) index_length,
4>concat( round( round( data_length + index_length ) / ( 1024 *1024 ) , 2 ) , 'M' ) total_size
5>FROM information_schema.TABLES;
'Oracle' 카테고리의 다른 글
[Oracle] 오라클 SQL 쿼리(DECODE) (0) | 2018.02.07 |
---|---|
[Oracle] 솔라리스 10 root ssh 원격접속 하기 (0) | 2018.02.07 |
[Oracle] 솔라리스 보안 정책(패스워드 만료일자 설정) (0) | 2018.02.06 |
[Oracle] 오라클 백업 export (0) | 2018.02.06 |
[Oracle] 오라클 점검 스크립트 (0) | 2018.02.06 |
- Total
- Today