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/env python | |
import socket,os | |
try: | |
zenhome = os.environ['ZENHOME'] | |
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
s.connect(zenhome + "/var/rrdcached.sock") | |
s.send('STATS\n') |
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/env python | |
import random | |
#numnets = 253 | |
#numhosts = 253 | |
numnets = 128 | |
numhosts = 253 |
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/env python | |
import glob | |
import os | |
import cPickle as pickle | |
pattern = '/'.join((os.environ['ZENHOME'], 'var/zenmodeler_*',)) | |
files = glob.glob(pattern) |
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
DELIMITER $$ | |
CREATE PROCEDURE `createfragTable`() | |
BEGIN | |
DECLARE ii INT DEFAULT 0; | |
DROP TABLE IF EXISTS fragme; | |
CREATE TABLE fragme ( |
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/env zendmd | |
import sys | |
def usage(): | |
print "usage: %s [DEVICE_ID] [DEVICE_ID]" % sys.argv[1] | |
if len(sys.argv) < 3: | |
usage() | |
sys.exit() |
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/env python | |
import time, os | |
import optparse | |
import fnmatch | |
import datetime | |
import subprocess | |
import logging | |
_LOG_FORMAT = "%(asctime)s %(levelname)s - %(message)s" | |
logging.basicConfig(level=logging.INFO, format=_LOG_FORMAT) |
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
if evt.summary.startswith("Unhandled exception in zenhub"): | |
evt.severity = 3 |
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
--- relstorage/adapters/mover.py.orig 2012-05-25 16:56:17.000000000 -0400 | |
+++ relstorage/adapters/mover.py 2012-05-25 16:57:16.000000000 -0400 | |
@@ -864,11 +864,23 @@ class ObjectMover(object): | |
else: | |
if self.database_name == 'mysql': | |
stmt = """ | |
- REPLACE INTO object_state (zoid, tid, state_size, state) | |
- SELECT zoid, %s, COALESCE(LENGTH(state), 0), state | |
- FROM temp_store | |
+ INSERT INTO object_state (zoid, tid, state_size, state) |
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/bash | |
LOG_FILE=sysbench_driver.log | |
rm -f $LOG_FILE | |
SYSBENCH=`which sysbench` | |
rc=$? | |
if [[ $rc != 0 ]]; then | |
echo "I could not find sysbench in the path." | |
exit $rc |
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/env zendmd | |
import uuid | |
import time | |
from MySQLdb import cursors | |
MAX_CHANGES = 10000 | |
total_changes = 0 | |
start_changes = time.time() | |
for d in dmd.Devices.getSubDevicesGen(): |
OlderNewer