Quantcast
Channel: Hacker News 50
Viewing all articles
Browse latest Browse all 9433

rubytune — rails performance tuning, emergency troubleshooting, server and ops consulting

$
0
0

Comments:"rubytune — rails performance tuning, emergency troubleshooting, server and ops consulting"

URL:http://rubytune.com/cheat


Copy

Process Basics

All processes, with params + hierarchy

Show all ruby-related PIDs and processes

What is a process doing?

What files does a process have open?
(also nice to detect ruby version of a process)

Flavors of kill

Keep an eye on a process

Memory

How much mem is free?
Learn how to read output

List the top 10 memory hogs

Detect OOM and other bad things

Disable OOM killer for a process

Disk/Files

Check reads/writes per disk

Files (often logs) marked for deletion but not yet deleted

Overview of all disks

Usage of this dir and all subdirs

Find files over 100MB

Low hanging fruit for free space.
Check /var/log too!

Find files created within the last 7 days

Find files older than 14 days

Delete files older than 14 days

Monitor a log file for an IP or anything else

Generate a large file (count * bs = total bytes)

Network

TCP sockets in use

Get IP/Ethernet info

host IP resolution

Curl, display headers (I), follow redirects (L)

Traceroute with stats over time (top for traceroute)Requires install

Traceroute using TCP to avoid ICMP blockage

List any IP blocks/rules

Drop any network requests from IP

Show traffic by port

Show all ports listening with process PID

D/L speed test (don't run in prod! :)

Terminal & Screen

Start a screen session as the current user

Join/re-attach to a screen session

Record a terminal session

Playback a recorded terminal session

Tips n Tricks

Run Previous command as root

Change to last working dir

Run something forever

Databases

"Tail" all queries hitting mysql.Learn more
Connect to production mysql locally on port 3307 via sshLearn More

Viewing all articles
Browse latest Browse all 9433

Trending Articles