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
var Semaphore = function(callback, context) { | |
this.semaphore = 0; | |
this.callback = callback; | |
this.context = context || this; | |
}; | |
Semaphore.prototype.increment = function() { | |
this.semaphore++; | |
}; |
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 | |
HOST=$1 | |
cd /var/lib/denyhosts | |
for i in `ls`; do mv $i $i.old; grep -v $HOST $i.old >> $i; done | |
cp /etc/hosts.deny /tmp/hosts.deny | |
grep -v $HOST /tmp/hosts.deny > /etc/hosts.deny |
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
// connection manager object is responsible for maintaining the connection to zk | |
var connection_manager = (function() { | |
var cm = {}; | |
// Start connection immediately (global for all instances) | |
var zk_trying = false; | |
var zkclass; | |
var zk; | |
// tries to make a connection (if one isn't already being attempted), waits for timeout |
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
require.paths.unshift('../'); | |
var ZK = require ('zookeeper').ZooKeeper; | |
var connect = require('connect'); | |
var Storage = (function() { | |
var that = {}; | |
// connection manager object is responsible for maintaining the connection to zk | |
var connection_manager = (function() { |
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
#!/usr/bin/perl | |
#LOG | |
#--- | |
#Log sequence number 248 2222568315 | |
#Log flushed up to 248 2222533410 | |
#Last checkpoint at 248 1843690869 | |
# | |
use strict; |
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 db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks | |
FROM percona.checksums, information_schema.tables | |
WHERE | |
percona.checksums.db=information_schema.tables.TABLE_SCHEMA AND | |
percona.checksums.tbl=information_schema.tables.TABLE_NAME AND | |
information_schema.tables.ENGINE != 'MEMORY' AND | |
percona.checksums.db='myDB' AND | |
( | |
master_cnt <> this_cnt | |
OR master_crc <> this_crc |
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
set global slow_query_log = OFF; | |
set global long_query_time = 0; | |
set global log_slow_verbosity = full; | |
set global slow_query_log_timestamp_always = ON; | |
set global slow_query_log_timestamp_precision=microsecond; | |
set global slow_query_log_use_global_control="log_slow_filter,log_slow_rate_limit,log_slow_verbosity,long_query_time"; |
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_haproxy { | |
script "killall -0 haproxy" | |
interval 2 | |
weight 5 | |
} | |
vrrp_instance VI_PXC_DB { | |
interface eth1 | |
state MASTER | |
virtual_router_id 60 |
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
[percona@db1 ~]$ cat /etc/security/limits.d/91-mysql.conf | |
* soft nofile 4096 | |
* hard nofile 4096 | |
* soft nproc 204800 | |
* hard nproc 204800 |
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
[client] | |
socket=/data/mysql/mysql.sock | |
[mysqld_safe] | |
# connect this node up to the cluster | |
wsrep_urls = gcomm://10.1.6.10:4567,gcomm://10.1.6.11:4567,gcomm://10.1.6.12:4567 | |
[mysqld] |
OlderNewer