$ mkdir .ssh
$ cd .ssh
$ ssh-keygen -t rsa
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/*
# Replace "31" with the total number of procs - 1 reported by nproc. Use "echo 0" or "echo 1" to disable or enable hyperthreading | |
sudo bash -c 'for i in {1..31..2}; do echo 0 > /sys/devices/system/cpu/cpu$i/online; done' |
#For Storm | |
git ls-remote --heads origin | sed 's?.*refs/heads/??' | xargs -I {} sh -c 'git reset; git checkout .; git clean -fdx; git checkout origin/{} >/dev/null 2>&1; echo $(grep "[^#]" conf/defaults.yaml 2>/dev/null | wc -l ) {};' | sort -k 1 -n | |
#For Flink | |
git ls-remote --heads origin | sed 's?.*refs/heads/??' | xargs -I {} ../script.sh {} | sort -k 1 -n | |
#Script | |
#!/bin/bash | |
git reset | |
git checkout . |
--- | |
- hosts: allnodes | |
vars: | |
user_name: 'ubuntu' | |
tasks: | |
- name: Download Public keys | |
fetch: src=/home/{{ user_name }}/.ssh/id_rsa.pub dest=keys/prefix-{{ ansible_hostname }} flat=yes | |
- name: create concatenated keys file |
$ mkdir .ssh
$ cd .ssh
$ ssh-keygen -t rsa
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/*
#Generate a list of 12 random integers between 0 10 | |
values = [random.randint(0,10) for _ in xrange(12)] |
#http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html | |
uptime | |
dmesg | tail | |
vmstat 1 | |
mpstat -P ALL 1 | |
pidstat 1 | |
iostat -xz 1 | |
free -m | |
sar -n DEV 1 | |
sar -n TCP,ETCP 1 |
#Getting the line number of a file from an ls command | |
ls -l reports/*.csv | grep -n "RollingCount_metrics_1454467885562.csv" | |
#Port forwarding with ssh (Port 80 from user@example.com is forwarded to port 9000 of imgur.com) | |
#http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html | |
ssh -L 9000:imgur.com:80 user@example.com |
#Downloading storm | |
mkdir bilal | |
cd bilal | |
mkdir app | |
mkdir app/storm | |
wget http://www.gtlib.gatech.edu/pub/apache/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz | |
tar xvzf apache-storm-0.9.3.tar.gz | |
mkdir storm | |
mv apache-storm-0.9.3/* storm/ |
#Get total number of configurations | |
cat defaults.yaml | grep "^[^#]" | wc -l | |
#Get configurations that are topology related | |
cat defaults.yaml | grep "^topology" | wc -l |
curl 'https://www.apache.org/dyn/closer.cgi' | grep -o '<strong>[^<]*</strong>' | sed 's/<[^>]*>//g' | head -1 | xargs -I {} echo {} |