Professional Documents
Culture Documents
Everything is a file
Finding Disks
/dev/sdX
/dev/sdX{i}
/dev/disk/by-uuid/98affd0e-9d3e-49c1-
bb66-a60119642462
/dev/disk/by-path/pci-0000:00:07.1-
scsi-0:0:0:0
Special Files
/dev/zero
/dev/null
/dev/(u)random
/dev/dsp
Poking The Kernel With ProcFS
root@keyserver:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family: 6
model : 15
model name: Intel(R) Xeon(R) CPU E7440 @ 2.40GHz
stepping: 1
cpu MHz : 2400.070
cache size: 16384 KB
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx lm
constant_tsc up arch_perfmon pebs bts rep_good pni ssse3 cx16 lahf_lm
bogomips: 4813.70
clflush size: 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
root@keyserver:~# cat /proc/meminfo
MemTotal: 253072 kB
MemFree: 7448 kB
Buffers: 25804 kB
Cached: 52552 kB
SwapCached: 4696 kB
Active: 156728 kB
Inactive: 25292 kB
SwapTotal: 522216 kB
SwapFree: 494832 kB
http://www.redhat.com/advice/tips/meminfo.htm
Set Swappyness
echo 0 > /proc/sys/vm/swappiness
# ~/.bash_profile
tomh$ ln -s `brew
--prefix`/Library/Contributions/brew_bash_completion.sh `brew
--prefix`/etc/bash_completion.d/
Using It
Performance Tools
top
iostat
vmstat
free
Finding Files
Find – Old Files
find /path/to/files* -mtime +NUMDAYS
Find – Big Files
find / -type f -size +200M
Found it? Do stuff to it
find / -type f -size +200M -exec ls -lh {} \;
locate
xargs
ps ax | grep apache | awk '{ print $1 }' | xargs kill
Sed and Awk
Puppet
respawn
expect fork
script
export HOME="/home/deploy"
export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export HIVE_HOME="/usr/lib/hive"
export HADOOP_HOME="/usr/lib/hadoop"
1: real time
2: for best-effort
3: for idle
Installing Applications
● Use system .debs where possible
● Author debs
● PPA
● Compile
● Make own .debs
● Be the PPA
Waxing Philosophical
There is one system, not a collection of systems.
The desired state of the system should be a known
quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the
desired state.
The only authoritative source for the actual state of the
system is the system.
The entire system must be deployable using source media
and text files
Hate SPOF
Dev
● It's the JS
● It's the DB
Nirvana
● There are no Ops
● Puppet is probably involved
Links
● http://aperiodic.net/screen/quick_reference
● http://www.planetdevops.net/
● http://blog.websages.com/2010/12/10/jameswhite-manifesto
● http://video2010.scottishrubyconference.com/show_video/6