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
import psutil | |
import simplejson | |
import time | |
import urllib2 | |
# Sends the CPU and memory usage stats to Loggly. Sends both a machine total and per process. | |
def log(): | |
"""""" | |
proc_dict = {} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
use strict; | |
use warnings; | |
use Getopt::Long qw(:config no_ignore_case ); | |
my $replace = undef; | |
my $delete = undef; | |
my $help = 0; | |
GetOptions ( |
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
/** | |
* Git Pull | |
* | |
* @author Adam Patterson | |
* http://www.adampatterson.ca/blog/2011/10/diy-simple-staging-server/ | |
* | |
* Use: echo pull(); | |
*/ | |
function pull ( ) |
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
diff --git a/redis.conf b/redis.conf | |
index 44fb536..505cb6e 100644 | |
--- a/redis.conf | |
+++ b/redis.conf | |
@@ -150,6 +150,13 @@ slave-serve-stale-data yes | |
# | |
# repl-timeout 60 | |
+# When setting up replication, the slave will purge the current data set before | |
+# loading the data sync from the master. Setting this will prevent that from |
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
1.) [1] [2] [3] Six node cluster | |
[4] [5] [6] | |
2.) [1] [2] <= [3] Hosts 2 and 5 replicate from 3 and 6 respectively. | |
[4] [5] <= [6] Once caught up, the clients are updated to point | |
to 2 and 5 instead, and 3 and 6 are terminated. | |
3.) [1] <= [2] Repeat. | |
[4] <= [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
unsigned long zslGetRank(zskiplist *zsl, double score, robj *o) { | |
zskiplistNode *x; | |
unsigned long rank = 0; | |
int i; | |
x = zsl->header; | |
for (i = zsl->level-1; i >= 0; i--) { | |
while (x->level[i].forward && | |
(x->level[i].forward->score < score || | |
(x->level[i].forward->score == score && |
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
Program received signal SIGSEGV, Segmentation fault. | |
zslGetRank (zsl=0x7f3d8d71c360, score=19.498544884710096, o=0x7f3d4cab5760) at t_zset.c:335 | |
335 (x->level[i].forward->score < score || | |
(gdb) bt | |
#0 zslGetRank (zsl=0x7f3d8d71c360, score=19.498544884710096, o=0x7f3d4cab5760) at t_zset.c:335 | |
#1 0x000000000042818b in zrankGenericCommand (c=0x7f3d9dcdc000, reverse=1) at t_zset.c:2046 | |
#2 0x00000000004108d4 in call (c=0x7f3d9dcdc000) at redis.c:1024 | |
#3 0x0000000000410c1c in processCommand (c=0x7f3d9dcdc000) at redis.c:1130 | |
#4 0x0000000000419d3f in processInputBuffer (c=0x7f3d9dcdc000) at networking.c:865 | |
#5 0x0000000000419e1c in readQueryFromClient (el=<value optimized out>, fd=<value optimized out>, privdata=0x7f3d9dcdc000, mask=<value optimized out>) at networking.c:908 |
OlderNewer