This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| #!/usr/bin/perl | |
| use Text::CSV; | |
| use Data::Dumper; | |
| my $headers = <STDIN>; | |
| my $csv = new Text::CSV; | |
| print "Last, First, Mobile, \"Phone (work)\", \"Email (work)\", \"Skype (work)\"\n"; |
This file contains hidden or 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
| #!/usr/bin/perl | |
| my $stats = "/var/lib/bitcasa/stats"; | |
| my %patterns = ( | |
| 'max_cache' => qr/Maximum Cache Size Setting: (.*)$/, | |
| 'current_cache' => qr/Current Cache Size: (.*)$/, | |
| 'available_cache' => qr/Available Cache Space: (.*)$/, | |
| 'used_cache' => qr/Used Cache Space: (.*)$/, |
This file contains hidden or 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
| tell application "System Events" | |
| tell current location of network preferences | |
| set VPNservice to service "My VPN" -- name of the VPN service | |
| if exists VPNservice then connect VPNservice | |
| repeat until (connected of current configuration of VPNservice) | |
| delay 1 | |
| end repeat | |
| end tell |