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 / 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 |
@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 / 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 / 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 / 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 / tapstatspoller.py
Created August 21, 2012 16:49
tapstatspoller
#!/usr/bin/python
# example ./poller.py localhost bucketname bucketpassword
from mc_bin_client import MemcachedClient
import time
import sys
from threading import Thread
stopped = False
def poller(ip,bucket,password):
mc = MemcachedClient(ip,11210)
mc.sasl_auth_plain(bucket,password)
@farshidce
farshidce / check-jira.py
Created August 2, 2012 17:00
check-jira
#!/usr/bin/env python2.6
# Copyright (c) 2010, Code Aurora Forum. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# # Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# # Redistributions in binary form must reproduce the above
@farshidce
farshidce / kvstore_1024
Created July 26, 2012 00:13
kvstore_1024
(dp0
I0
(lp1
S'zzz_cb_dummy_76'
p2
aS'zzz_cb_dummy_937'
p3
asI1
(lp4
S'zzz_cb_dummy_255'
@farshidce
farshidce / vbucketpop.py
Created July 26, 2012 00:12
vbucketpop
#!/usr/bin/env python
"""Load data into memcached and an on disk key value store."""
import sys
import getopt
import mc_bin_client
import pickle
def usage(err=None):
err_code = 0
validation :
- replica index enabled and disabled
- failover
todo :
- Replica Index ( Feature Tests )
- Aliaksey to explain when how replica index