This file contains hidden or 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 | |
# enable forwarding | |
echo 1 >| /proc/sys/net/ipv4/ip_forward | |
# get softirq sharing between CPU cores for Receive Packet Steering | |
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/network-rps.html | |
for rxq in $(ls -1 /sys/class/net/*/queues/rx-*/rps_cpus) | |
do | |
echo $(taskset -p 1 | cut -d':' -f2 | tr -d '[:space:]') >| $rxq |
This file contains hidden or 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 | |
command -v aws >/dev/null 2>&1 || { echo >&2 "I require awscli but it's not installed. Aborting."; exit 1; } | |
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; } | |
# Find local instance_id | |
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
# Find cloudformation stack-id | |
STACK_ID=$(aws ec2 describe-instances --output text --instance-ids $INSTANCE_ID | grep -e 'TAGS\saws:cloudformation:stack-id' | awk '{print $3}') |
This file contains hidden or 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/sh | |
kafkacat -t test -b localhost -u -q | pv -l > /dev/null |
This file contains hidden or 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
diff -Naur spl-0.6.5.8.orig/rpm/generic/spl-dkms.spec.in spl-0.6.5.8/rpm/generic/spl-dkms.spec.in | |
--- spl-0.6.5.8.orig/rpm/generic/spl-dkms.spec.in 2017-01-23 14:36:09.403082000 -0500 | |
+++ spl-0.6.5.8/rpm/generic/spl-dkms.spec.in 2017-01-23 14:36:23.151812000 -0500 | |
@@ -18,7 +18,7 @@ | |
Requires: dkms >= 2.2.0.2 | |
Requires: gcc, make, perl | |
-Requires: kernel-devel | |
+Requires: kernel-uek-devel | |
Provides: %{module}-kmod = %{version} |
This file contains hidden or 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 | |
# elasticsearch url | |
elasticsearch_hosts="devesdatasa100.athenahealth.com:9251,devesdatasa101.athenahealth.com:9251,devesdatasa102.athenahealth.com:9251" | |
port=$(( ((RANDOM<<15)|RANDOM) % 63001 + 2000 )) | |
function usage() | |
{ |
This file contains hidden or 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 | |
# repository for snapshots | |
snapshots_repo="es-snapshots" | |
# filesystem for snapshots | |
snapshots_fs="/es-snapshots" | |
# elasticsearch url | |
elasticsearch_url="http://esdatafb101.athenahealth.com:9210" |
This file contains hidden or 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 | |
index="epriorauth" | |
date="2016-08-23" | |
broker="kafka100" | |
topic="structured_log_all" | |
kafkacat -b $broker -t $topic -C -o beginning \ | |
| jq --arg index "$index" --arg date "$date" -cM '{"@timestamp": .["@timestamp"], "@target_index": .["@target_index"]} | select(.["@target_index"]==$index) | select( .["@timestamp"] | startswith($date) )' |
This file contains hidden or 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 | |
# This script will check if there is unallocated space in the volume group | |
# and will attempt to expand logical volume and file system using resize2fs | |
# Author: Stas Alekseev <[email protected]> | |
fs_mount="/var" | |
vg_minfree_mb="100000" | |
lv_maxsize_mb="27000" | |
warn () { |
This file contains hidden or 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 | |
# | |
# This script will check that both NameNodes are alive in HDFS HA | |
# configuration and will force failover to the preferred NameNode. | |
# | |
# Author: Stas Alekseev <[email protected]> | |
# | |
ACTIVE_NAMENODE=nn1 | |
STANDBY_NAMENODE=nn2 |
This file contains hidden or 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
#include <stdio.h> | |
#include <unistd.h> | |
int main() | |
{ | |
printf ("kill -9 <parent>\n"); | |
kill (getppid(), 9); | |
} |