MySQL - Monitoring
Monitoring
Processes lerden mysql in izlenmesi
|
1 |
#ps -ef|grep mysql |
root 2471 1 0 07:24 ? 00:00:00 /bin/sh /mysql/mysql/bin/mysqld_safe -log-queries-not-using-indexes -log-slave-updates -datadir=/mysql/mysql/data -pid-file=/mysql/mysql/data/db01.local.domain.pid
mysql 3303 2471 0 07:24 ? 00:00:03 /mysql/mysql/bin/mysqld -basedir=/mysql/mysql -datadir=/mysql/mysql/data -plugin-dir=/mysql/mysql/lib/plugin -user=mysql -log-queries-not-using-indexes -log-slave-updates -log-error=/mysql/mysql/data/db01.local.domain.err -open-files-limit=8192 -pid-file=/mysql/mysql/data/db01.local.domain.pid -socket=/tmp/mysql.sock -port=3306
root 3730 3699 0 07:25 pts/1 00:00:00 mysql -u root -p
root 3813 3760 0 07:48 pts/2 00:00:00 grep mysql
Mysql in çalışıp çalışmadığı çalışıyorsa hangi portu dinlediği
|
1 |
#netstat -ntlp -- 3306 |
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:963 0.0.0.0:* LISTEN 2053/rpc.statd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3303/mysqld
Log izleme
|
1 |
tail -f /mysql/mysql/data/db01.local.domain.err |
Status information
|
1 2 |
SELECT table_schema "Data Base Name", sum( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ; |
|
1 2 3 |
SELECT table_name, table_row[box type="info"]s, data_length, index_length, round(((data_length + index_length) / 1024 / 1024),2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = 'PFM_METERING'; |
