This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PATH=$PATH:~ | |
echo "Creating digests for $1" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note status (similar to what clustercheck does) | |
[root@civic ~]# /usr/lib64/nagios/plugins/pmp-check-mysql-status -x wsrep_local_state -C '!=' -w 4 | |
OK wsrep_local_state = 4 | wsrep_local_state=4;4;;0; | |
# Cluster size (warn when it's lower than 3) | |
[root@civic ~]# /usr/lib64/nagios/plugins/pmp-check-mysql-status -x wsrep_cluster_size -C '<' -w 3 | |
WARN wsrep_cluster_size = 1 | wsrep_cluster_size=1;3;;0; | |
# Checking replication health | |
[root@civic ~]# /usr/lib64/nagios/plugins/pmp-check-mysql-status -x wsrep_flow_control_paused -C '>=' -w 0.5 -c 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is a sample of output: | |
root@percona-db-2:~# iperf -s -u -B 226.94.1.1 -i 1 | |
------------------------------------------------------------ | |
Server listening on UDP port 5001 | |
Binding to local address 226.94.1.1 | |
Joining multicast group 226.94.1.1 | |
Receiving 1470 byte datagrams | |
UDP buffer size: 122 KByte (default) | |
------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vrrp_script prefer_node1 { | |
script "test `hostname` == 'node1'" | |
interval 600 | |
weight 5 | |
} | |
vrrp_script prefer_node2 { | |
script "test `hostname` == 'node2'" | |
interval 600 | |
weight 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vrrp_script chk_node1 { | |
script "test `hostname` == 'node1'" | |
interval 2 | |
weight 5 | |
} | |
vrrp_script chk_node3 { | |
script "test `hostname` == 'node3'" | |
interval 2 | |
weight 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select table_schema, table_name, engine from information_schema.tables where engine != 'InnoDB' and table_schema not in ('information_schema', 'performance_schema', 'mysql'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prep: | |
[root@node1 ~]# date; sysbench --test=sysbench_tests/db/oltp.lua \ | |
--mysql-host=node1 --mysql-user=test --mysql-db=test \ | |
--oltp-table-size=250000 --report-interval=1 --max-requests=0 \ | |
--tx-rate=10 prepare | |
node1> CREATE TABLE `other` ( | |
`i` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`j` varchar(32) DEFAULT NULL, | |
PRIMARY KEY (`i`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
maxconn 4096 | |
uid 99 | |
gid 99 | |
daemon | |
defaults | |
log global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install perf | |
install galera-debuginfo (if PXC) | |
install PS/PXC debuginfo | |
# collect 1 pid | |
perf record -g -p 16004 | |
# collect all procs | |
perf record -a -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n "Max processes=X:Y" > /proc/`pidof mysqld`/limits | |
X = soft limit | |
Y = hard limit |