- 2014/05/30 (金)
- @itiut
vimtutor
やりつつVimの操作方法に慣れる.vimrc
のおすすめ設定- ターミナルのtipsいくつか紹介
$ sudo service docker restart | |
docker: unrecognized service |
set xrange [0:23]; | |
set xtics 1, 1, 22; | |
set mytics 2.5; | |
unset key; | |
set xlabel 'Queries'; | |
set ylabel 'Execution Time [sec]'; | |
set boxwidth 0.5; | |
set style fill solid 0.5; |
#!/bin/sh | |
set -eux | |
if [ ! -d /mnt/kugenuma51 ]; then | |
sudo mkdir --parents /mnt/kugenuma51 | |
sudo chown $USER:$USER /mnt/kugenuma51 | |
fi | |
sshfs kugenuma51:/export/home1/tanikawa /mnt/kugenuma51 -o follow_symlinks,idmap=user,intr,ssh_command=autossh |
#!/bin/sh | |
set -eux | |
cd $(dirname $0) | |
BASE_DIR=$KUGENUMA51_HOME/opt/mysql | |
DATA_DIR=$KUGENUMA51_HOME/mnt | |
rm -rf $DATA_DIR/* | |
cd $BASE_DIR |
#!/bin/sh | |
set -eux | |
BIN_DIR=$KUGENUMA51_HOME/bin | |
SRC_DIR=$KUGENUMA51_HOME/src | |
REPOSITORY=tpch-mysql | |
REPO_DIR=$SRC_DIR/$REPOSITORY | |
if [ ! -d $REPO_DIR ]; then | |
cd $SRC_DIR |
#!/bin/sh | |
LC_TIME=POSIX sar -u 1 > sar.out & | |
PID=$! | |
dd if=/dev/zero of=/tmp/dd.out bs=1M count=1000 oflag=direct | |
sleep 5 | |
kill $PID |
#!/bin/sh | |
set -eux | |
cd $(dirname $0) | |
join_sar() { | |
local cpu_out=sar_cpu$1.out | |
local io_out=sar_io$1.out | |
local sar_out=sar$1.out | |
local cpu_out_temp=$cpu_out.temp | |
local io_out_temp=$io_out.temp |
#!/bin/sh | |
set -eux | |
cd $(dirname $0) | |
# for i in {1..22}; do LINE=`wc -l $i.out | cut -d ' ' -f 1`; grep -e "^select$" -A $LINE $i.out | grep -o -e "[[:digit:]]\+\.[[:digit:]]\+ sec)" -m 1 | cut -d ' ' -f 1 | sed "s/^/$i /g"; done > execution_time.dat | |
parse_execution_time() { | |
local qout=$1 | |
local status_line=$(grep -n '| Status *| Duration *|' $qout | cut -d ':' -f 1) | |
tail -n +$((status_line + 2)) $qout | grep '^|' | sed 's/^| \| |$//g' | sed 's/ *| */,/g' > time$qout |
#!/bin/sh | |
set -eu | |
cd $(dirname $0) | |
if [ $# -ne 1 ]; then | |
echo "Usage: [$0] directory" | |
exit | |
fi | |
cd $1 |