Skip to content

Instantly share code, notes, and snippets.

View reddikih's full-sized avatar

Satoshi Hikida reddikih

View GitHub Profile
@reddikih
reddikih / fio-random-read
Created February 8, 2017 03:22
FIO random read
[random-read]
ioengine=libaio
iodepth=1400
rw=randread
direct=0
numjobs=1
blocksize=4096
;size=33%
;filename=/dev/sdb
iodepth_batch=1400
@reddikih
reddikih / log-collection.sh
Created August 23, 2016 22:47
A simple C* log collect script
#!/bin/sh
endpoints=$1
output=$2
if [ -z $endpoints ] || [ -z $output ];then
echo "Usage: $0 endpoints out_dir"
exit 1
fi
@reddikih
reddikih / batch-insert.py
Created August 5, 2016 06:38
Batch insert python script. It is using the python driver provided by Datastax
#!/usr/bin/env python
from cassandra.cluster import Cluster
from cassandra.query import *
from cassandra import *
import hashlib
import sys
KEYSPACE = 'test'
TABLE = 'user'
BATCH_SIZE = 1000
@reddikih
reddikih / progress-in-shell.sh
Last active August 17, 2016 06:59
The template to display something in progress. and colored message will be displayed when it is finished.
#!/bin/sh
# See: http://www.m-bsys.com/linux/echo-color-1
TIME=10
echo -n "starting server"
while [ $TIME -gt 0 ]
do
echo -n "."
sleep 1