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
vagrant@mongodb-server:~$ sudo pmm-admin add mongodb --replset repl1 --cluster cluster1 --nodetype mongod | |
Error: unknown flag: --replset | |
Usage: | |
pmm-admin add mongodb [name] [flags] | |
Examples: | |
pmm-admin add mongodb | |
pmm-admin add mongodb --cluster bare-metal | |
Flags: |
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
root@galera1:/tmp# which innobackupex | |
/usr/bin/innobackupex | |
root@galera1:/tmp# file /usr/bin/innobackupex | |
/usr/bin/innobackupex: symbolic link to `xtrabackup' | |
root@galera1:/tmp# xtrabackup --help | |
xtrabackup version 2.3.6 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 7686bfc) | |
Open source backup tool for InnoDB and XtraDB | |
Copyright (C) 2009-2015 Percona LLC and/or its affiliates. | |
Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved. |
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
yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm | |
packages=""; for p in client-56 server-56; do packages="$packages Percona-XtraDB-Cluster-$p"; done; yum install $packages | |
systemctl start mysql@bootstrap.service | |
mysql -e 'show global status like "wsrep_cluster%"' |
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
[mysqld] | |
tmpdir = /tmp | |
# Threads | |
max_connections = 200 | |
# networking | |
skip-name-resolve |
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
test -x pt-diskstats || { | |
wget http://www.percona.com/get/pt-diskstats | |
chmod +x pt-diskstats | |
} | |
reqs="" | |
which netstat || reqs="netstat $reqs" | |
which vmstat || reqs="vmstat $reqs" | |
which top || reqs="top $reqs" | |
rpm -qa > /tmp/rpms.$$ | |
grep perl-Time-HiRes /tmp/rpms.$$ || reqs="perl-Time-HiRes $reqs" |
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 | |
usage() | |
{ | |
cat <<EOF>&2 | |
usage: $0 <name> | |
knits ${name}.Rmd into ${name}.md and ${name}.html | |
EOF | |
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
{ | |
"id": 1, | |
"title": "MongoDB", | |
"originalTitle": "MongoDB", | |
"tags": [], | |
"style": "dark", | |
"timezone": "browser", | |
"editable": true, | |
"hideControls": false, | |
"sharedCrosshair": false, |
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
for test in oltp update_index update_non_index; do | |
mkdir $test; pushd $test | |
for i in 50000 25000 10000 5000 2500 1000 | |
#for i in 10 | |
do | |
sysbench --mysql-engine-trx=yes --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp_tables_count=32 --mysql-user=sb --mysql-password=sbs3cret --mysql_table_engine=tokudb --num-threads=16 --oltp-table-size=${i}000 --rand-type=pareto --rand-init=on --report-interval=10 --mysql-host=sbhost --mysql-db=sbtest --max-time=7200 --max-requests=0 prepare | |
sysbench --mysql-engine-trx=yes --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp_tables_count=32 --mysql-user=sb --mysql-password=sbs3cret --mysql_table_engine=tokudb --num-threads=16 --oltp-table-size=${i}000 --rand-type=pareto --rand-init=on --report-interval=10 --mysql-host=sbhost --mysql-db=sbtest --max-time=7200 --max-requests=0 run | tee -a toku.${i}.${test}.ssd.txt | |
sysbench --mysql-engine-trx=yes --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp_tables_count=32 --mysql-user=sb --mysql-password=sbs3cret --mysql_ta |
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
# To get from: | |
# telecaster:data_collection_scripts fernandoipar$ cat /tmp/test.csv | |
# 1*1,0,1 | |
# 1*2,0,2 | |
# 2+4,1*1024*1024,2*1024*1024*1024 | |
# to: | |
# > t | |
# V1 V2 V3 | |
# 1 1 0 1 | |
# 2 2 0 2 |
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
fac() | |
{ | |
[ $1 -eq 0 ] && echo 1 && return | |
seq $1 |tr '\n' '*'|sed 's/*$//g' | bc | |
} |