MySQL 5.5 NDB集群如何查看日志

64次阅读
没有评论

共计 5883 个字符,预计需要花费 15 分钟才能阅读完成。

这篇文章主要介绍了 MySQL 5.5 NDB 集群如何查看日志,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让丸趣 TV 小编带着大家一起了解一下。

在管理节点查看日志

~ ps -ef|grep mysql
root  3934  1  0 May11 ?  00:08:45 /usr/sbin/ndb_mgmd -f /var/lib/mysql/mysql-cluster/config.ini
apache  4563 24164  0 Sep04 ?  00:00:00 /usr/var/ss7/mctel/bin/dmc_mysqlmap -id 10 -t /tmp/dmc_mysqlmap.log -c /usr/var/ss7/mctel/conf/dmc_mysqlmap.conf -enc 1 -list BLACKBERRY TORCH 9800
ss7  6107 31236  0 10:44 pts/0  00:00:00 grep –color mysql
~ cd /var/lib/mysql/mysql-cluster/
ss7@bep02.mtnng.com – Tue Sep 06 10:44:44
/var/lib/mysql/mysql-cluster ll
total 5.5M
-rw-r–r– 1 root root 4.9K May 15  2014 config.ini
-rw-r–r– 1 root root 671K Sep  6 09:25 ndb_1_cluster.log
-rw-r–r– 1 root root 977K Feb 10  2015 ndb_1_cluster.log.1
-rw-r–r– 1 root root 977K Feb 13  2015 ndb_1_cluster.log.2
-rw-r–r– 1 root root 977K Feb 24  2015 ndb_1_cluster.log.3
-rw-r–r– 1 root root 977K Apr  6  2015 ndb_1_cluster.log.4
-rw-r–r– 1 root root 977K Oct  4  2015 ndb_1_cluster.log.5
-rw-r–r– 1 root root 5.3K Aug  8 06:22 ndb_1_out.log
-rw-r–r– 1 root root  4 May 11 21:05 ndb_1.pid
ss7@bep02.mtnng.com – Tue Sep 06 10:44:46

/var/lib/mysql/mysql-cluster cat config.ini | more
..
[NDB_MGMD]
# MySQL Cluster Management node on vbep
NodeId=1
Hostname=vbep-bepdb  # Alias for the internal eth/bond name server
  # Note: this alias must be defined in /etc/hosts
DataDir=/var/lib/mysql/mysql-cluster  # This is a NOT the default location
  # It has been customized for MCTEL!!
[NDBD]
–More–
# NDB Storage node on db01-sync
NodeId=11
–More–
HostName=db01-sync  # Alias for the SYNC eth/bond name server
  # Note: this alias must be defined in /etc/hosts
DataDir=/var/lib/mysql/data  # MCTEL check-point and REDO logs directory
[NDBD]
# NDB Storage node on db02-sync
NodeId=12
HostName=db02-sync  # Alias for the SYNC eth/bond name server
  # Note: this alias must be defined in /etc/hosts
DataDir=/var/lib/mysql/data  # MCTEL check-point and REDO logs directory
..

在数据节点查看日志

~/mctel ps -ef|grep ndb
root  6735  1  0 May11 ?  00:00:00 /usr/sbin/ndbd –defaults-file=/etc/my.cnf
root  6736  6735 51 May11 ?  60-18:02:44 /usr/sbin/ndbd –defaults-file=/etc/my.cnf
ss7  28110 27214  0 10:59 pts/0  00:00:00 grep –color ndb
/var/lib/mysql/database cd /var/lib/mysql/data
ss7@db01.mtnng.com – Tue Sep 06 11:09:19

/var/lib/mysql/data ls -trl
total 31M
-rw-r–r– 1 root root  959K Jan  2  2014 ndb_11_trace.log.1
-rw-r–r– 1 root root  933K May  6  2014 ndb_11_trace.log.2
-rw-r–r– 1 root root  997K May 11  2014 ndb_11_trace.log.3
-rw-r–r– 1 root root 1015K May 16  2014 ndb_11_trace.log.4
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.5
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.6
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.7
-rw-r–r– 1 root root  939K May 16  2014 ndb_11_trace.log.8
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.9
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.10
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.11
-rw-r–r– 1 root root  939K May 16  2014 ndb_11_trace.log.12
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.13
-rw-r–r– 1 root root  940K May 16  2014 ndb_11_trace.log.14
-rw-r–r– 1 root root  5 May 16  2014 ndb_11.pid-BAK
drwxr-x— 9 root root  4.0K Feb  9  2015 ndb_11_fs/
-rw-r–r– 1 root root  2 Feb 24  2015 ndb_11_trace.log.next
-rw-r–r– 1 root root  1.1M Feb 24  2015 ndb_11_trace.log.15
-rw-r–r– 1 root root  7.4K Feb 24  2015 ndb_11_error.log
-rw-r–r– 1 root root  5 May 19 12:05 ndb_11.pid
-rw-r–r– 1 root root  17M Sep  6 09:18 ndb_11_out.log
ss7@db01.mtnng.com – Tue Sep 06 11:09:23

/var/lib/mysql/data cat ndb_11.pid
30946ss7@db01.mtnng.com – Tue Sep 06 11:09:37
/var/lib/mysql/data ps -ef|grep 30946
ss7  6072  2663  0 11:09 pts/0  00:00:00 grep –color 30946
root  30946  1  0 May19 ?  00:03:26 /usr/sbin/ndbd –defaults-file=/etc/my.cnf
root  30947 30946 56 May19 ?  61-15:10:58 /usr/sbin/ndbd –defaults-file=/etc/my.cnf
ss7@db01.mtnng.com – Tue Sep 06 11:09:46
/var/lib/mysql/data tailf -20 ndb_11_out.log
2016-09-06 08:05:33 [ndbd] INFO  — timerHandlingLab now: 27683165959 sent: 27683165808 diff: 151
2016-09-06 08:16:25 [ndbd] INFO  — part: 0 : time to complete: 1
2016-09-06 08:16:28 [ndbd] WARNING  — Ndb kernel thread 0 is stuck in: Job Handling elapsed=100
2016-09-06 08:16:28 [ndbd] WARNING  — Time moved forward with 2538 ms
2016-09-06 08:16:28 [ndbd] INFO  — Watchdog: User time: 407716035  System time: 124144921
2016-09-06 08:16:28 [ndbd] WARNING  — timerHandlingLab now: 27683820592 sent: 27683818054 diff: 2538
2016-09-06 08:16:28 [ndbd] INFO  — Watchdog: User time: 407716045  System time: 124144922
2016-09-06 08:16:28 [ndbd] WARNING  — Watchdog: Warning overslept 2464 ms, expected 100 ms.
2016-09-06 08:17:42 [ndbd] INFO  — timerHandlingLab now: 27683895142 sent: 27683894986 diff: 156
2016-09-06 08:29:52 [ndbd] INFO  — timerHandlingLab now: 27684624899 sent: 27684624737 diff: 162
2016-09-06 08:40:00 [ndbd] INFO  — timerHandlingLab now: 27685233311 sent: 27685233138 diff: 173
2016-09-06 08:46:05 [ndbd] INFO  — timerHandlingLab now: 27685598094 sent: 27685597940 diff: 154
Backup : Excessive Backup/LCP write rate in last monitoring period – recorded = 12920841 bytes/s, configured = 10485760 bytes/s
Backup : Monitoring period : 1055 millis. Bytes written : 3407872.  Max allowed : 3145728
Backup : Excessive Backup/LCP write rate in last monitoring period – recorded = 12970017 bytes/s, configured = 10485760 bytes/s
Backup : Monitoring period : 1051 millis. Bytes written : 3407872.  Max allowed : 3145728
2016-09-06 09:10:27 [ndbd] INFO  — timerHandlingLab now: 27687059954 sent: 27687059803 diff: 151
2016-09-06 09:18:34 [ndbd] INFO  — timerHandlingLab now: 27687547122 sent: 27687546958 diff: 164
Backup : Excessive Backup/LCP write rate in last monitoring period – recorded = 13157806 bytes/s, configured = 10485760 bytes/s
Backup : Monitoring period : 1036 millis. Bytes written : 3407872.  Max allowed : 3145728

在 SQL 节点查看日志

~/mctel ps -ef|grep mysql
ss7  3786  2663  0 11:06 pts/0  00:00:00 grep –color mysql
root  16451  1  0 Aug13 ?  00:00:00 /bin/sh /usr/bin/mysqld_safe –defaults-file=/var/lib/mysql/main_my.cnf
mysql  16888 16451 81 Aug13 ?  19-05:35:07 /usr/sbin/mysqld –defaults-file=/var/lib/mysql/main_my.cnf –basedir=/usr –datadir=/var/lib/mysql/database –plugin-dir=/usr/lib64/mysql/plugin –user=mysql –log-error=/var/lib/mysql/database/db01.mtnng.com.err –open-files-limit=50000 –pid-file=/var/lib/mysql/database/db01.mtnng.com.pid –socket=/var/lib/mysql/mysql.sock –port=3306
ss7@db01.mtnng.com – Tue Sep 06 11:06:31

感谢你能够认真阅读完这篇文章,希望丸趣 TV 小编分享的“MySQL 5.5 NDB 集群如何查看日志”这篇文章对大家有帮助,同时也希望大家多多支持丸趣 TV,关注丸趣 TV 行业资讯频道,更多相关知识等着你来学习!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-27发表,共计5883字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)