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
This is a quick tldr; there are many other situations and options you could consider. | |
FIO man page | |
IOP/s = Input or Output operations per second | |
Throughput = How many MB/s can you read/write continuously | |
Variables worth tuning based on your situation: | |
--iodepth | |
The iodepth is very dependant on your hardware. |
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
Wow! I Didn't Know You Could Do That In vi | |
compiled by: Patricia Bender | |
ESC = the escape key | |
RET = the return key | |
char = any lowercase character | |
8 = any number | |
num = any number |
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
netstat -plnt |
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
1) copy key to new instance. My-new-key.pem to .ssh | |
2) change permissions (chmod 400) | |
3) run as ec2-user/centos/ubuntu: | |
cd .ssh | |
ssh-keygen -f My-new-key.pem -y >> authorized_keys |
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
ps aux | grep 'httpd' | awk '{print "PID ->" $2 " MEM ->" $6/1024 " MB";}' | |
watch -n 1 "echo -n 'Apache Processes: ' && ps -C httpd --no-headers | wc -l && free -m" | |
ps -ylC httpd --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}' | |
1) process tree | |
pstree -p | grep httpd | |
2) sessions memory | |
ps aux | grep 'httpd' | awk '{print "PID ->" $2 " MEM ->" $6/1024 " MB";}' |
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
# set variable AWS_PROFILE= to credentials | |
import boto3 | |
# CHANGE REGION HERE- | |
ec2 = boto3.resource('ec2', 'sa-east-1') | |
#check your own tags before run this script | |
#loop for tag Name | |
def tag_name(): | |
print "Loop for TAG Name" | |
for volume in ec2.volumes.all(): |
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
Pré Requisitos: | |
Gerar o dump com EXP, e não EXPDP | |
Passos para importar: | |
1) Criar uma Ec2, t2.micro com a AMI: OL7.2-x86_64-HVM-2015-12-10 (ami-b24acede) | |
2) Habilitar swap na máquina |
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
==== GLUSTERFS CENTOS 6 ==== | |
========repo====== | |
vim /etc/yum.repos.d/gluster.repo | |
[rhel6.8-gluster] | |
name=RHEL 6.8 gluster repository | |
baseurl=http://buildlogs.centos.org/centos/6/storage/x86_64/gluster-3.8/ | |
gpgcheck=0 | |
enabled=1 |
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 | |
#1) Create your private subnet, SGs, and etc... and get the route table ID from privates subnets that need a NAT instance / allocate a new Elastic IP and get the ID. | |
#2) create a launch configuration with the script bellow (dont use user-data text, upload a file with '.sh' extension) | |
# use the this policy in AMI role: | |
#ec2-role-policy | |
# { | |
# "Version": "2012-10-17", | |
# "Statement": [ | |
# { |
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
on run | |
set folderList to (choose folder with multiple selections allowed) | |
tell application "Photos" | |
activate | |