Skip to content

Instantly share code, notes, and snippets.

View farshidce's full-sized avatar

Farshid Ghods farshidce

  • LinkedIn
  • San Francisco
View GitHub Profile
@farshidce
farshidce / plum-11-26-2012.txt
Created November 27, 2012 06:59
plum-11-26-2012
11 node cluster
running this workload now for the next 10 hours , doc size is 512 , i think this is going to push the cluster to dgm
{
"name" : "plum",
"desc" : "very simple key-value test",
"loop" : true,
"phases" : {
"0" :
{
@farshidce
farshidce / pump_mbf.py
Created December 7, 2012 03:29
pump_mbf.py
#!/usr/bin/env python
import glob
import logging
import os
import sys
import socket
import memcacheConstants
from cbcollections import defaultdict
@farshidce
farshidce / shelling.py
Created January 17, 2013 21:33
shelling.py
import os
import sys
sys.path.append(".")
sys.path.append("lib")
import uuid
from memcached.helper.data_helper import VBucketAwareMemcached
from membase.api.rest_client import RestConnection
server = {"ip":"10.6.2.37","port":8091,"username":"Administrator","password":"password"}
mc = VBucketAwareMemcached(RestConnection(server), 'default')
@farshidce
farshidce / atopparser.py
Created January 22, 2013 00:58
parseatop.py
# run atop
# convert that to a python dictionary which can be sent back
#two parser , one that parses system stats , the other one process leve stats
import re
class AtopParser(object):
@staticmethod
@farshidce
farshidce / atop-sample.txt
Created January 22, 2013 01:00
sample atop
ATOP - cen-2101 2013/01/17 10:38:44 ------ 7d20h45m0s elapsed
PRC | sys 231m05s | user 331m03s | #proc 130 | #zombie 0 | #exit 0 |
CPU | sys 3% | user 9% | irq 1% | idle 378% | wait 9% |
cpu | sys 1% | user 4% | irq 0% | idle 94% | cpu000 w 1% |
cpu | sys 1% | user 2% | irq 0% | idle 96% | cpu003 w 1% |
cpu | sys 1% | user 2% | irq 0% | idle 91% | cpu001 w 6% |
cpu | sys 1% | user 2% | irq 0% | idle 97% | cpu002 w 1% |
CPL | avg1 3.23 | avg5 3.89 | avg15 3.26 | csw 119001e4 | intr 76281e4 |
MEM | tot 7.8G | free 57.2M | cache 2.5G | buff 16.4M | slab 105.9M |
SWP | tot 5.0G | free 4.5G | | vmcom 5.8G | vmlim 8.9G |
import os
import random
from threading import Thread
import unittest
from TestInput import TestInputSingleton
import mc_bin_client
import time
import uuid
import logger
import datetime
[{"sex": "f", "age": 47, "days": 1, "state": "South Carolina", "pid": "727-79-4803", "walk": 3.0}, {"sex": "f", "age": 47, "days": 2, "state": "South Carolina", "pid": "727-79-4803", "walk": 6.0}, {"sex": "f", "age": 47, "days": 4, "state": "South Carolina", "pid": "727-79-4803", "walk": 12.0}, {"sex": "f", "age": 47, "days": 5, "state": "South Carolina", "pid": "727-79-4803", "walk": 24.0}, {"sex": "f", "age": 47, "days": 7, "state": "South Carolina", "pid": "727-79-4803", "walk": 30.0}, {"sex": "f", "age": 47, "days": 10, "state": "South Carolina", "pid": "727-79-4803", "walk": 42.0}, {"sex": "f", "age": 47, "days": 14, "state": "South Carolina", "pid": "727-79-4803", "walk": 60.0}, {"sex": "f", "age": 47, "days": 18, "state": "South Carolina", "pid": "727-79-4803", "walk": 66.0}, {"sex": "m", "age": 80, "days": 1, "state": "Vermont", "pid": "758-04-1110", "walk": 2.0999999999999996}, {"sex": "m", "age": 80, "days": 2, "state": "Vermont", "pid": "758-04-1110", "walk": 4.199999999999999}, {"sex": "m", "age":
'longTermInsulin': {'date': {'75': {'09-07-2015': 22.0,
'09-08-2015': 31.0,
'09-10-2015': 35.0,
'09-11-2015': 31.0,
'09-12-2015': 34.0,
'09-13-2015': 13.0,
'09-14-2015': 32.0,
'09-15-2015': 21.0,
'09-16-2015': 25.0,
'09-17-2015': 34.25,
@farshidce
farshidce / centos7kickstarter
Created December 9, 2015 02:17
centos7kickstarter
# CentOS 7.0 kickstart for XenServer
# branch: develop
##########################################
# Install, not upgrade
install
# Install from a friendly mirror and add updates
url --mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os
repo --name=centos-updates --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates