linux-tracing-workshop
Tools
HTML
Linux Tracing Workshops Materials
This repository contains examples and hands-on labs for various Linux tracing workshops, focusing on modern tracing tools. To perform these labs, you will need a Linux box that meets several prerequisites. You can also use an EC2 instance supplied by the instructor.
Prerequisites
- Linux 4.6+ (the distribution doesn’t matter; tested on Ubuntu and Fedora Core)
- perf
- perf-map-agent
- FlameGraph
- perf-tools
- bcc
- OpenJDK
- The systemtap-sdt-dev package on Ubuntu or the systemtap-sdt-devel package on Fedora/RHEL
-
Node.js built from source with
configure --with-dtrace
-
MySQL or MariaDB built from source with
-DENABLE_DTRACE=1
-
PostgreSQL built from source with
configure --enable-dtrace
- MySQL Python Connector
If you’re using Fedora 24+, try the experimental setup script, which can fetch you a recent kernel from mainline and install all the packages and tools you need for this workshop. Use at your own risk!
Strigo Virtual Environment
When this workshop is delivered as instructor-led training, the instructor will provision a Strigo virtual classroom (EC2 instances) for each student. To use the Strigo virtual environment:
- Log in to Strigo using the link provided by the instructor (you can log in with Google or create a new account, no verification required)
- Enter the classroom token (four characters) provided by the instructor to join the classroom
- Navigate to the Lab tab (fourth from the top, the icon that looks like a test tube) to get your EC2 instance started
Labs
- Probing Tracepoints with ftrace
-
CPU Sampling with
perf
and Flame Graphs - Using BPF Tools: Broken File Opens
- Using BPF Tools: Slow File I/O
- Using BPF Tools: Chasing a Memory Leak
- Using BPF Tools: Database and Disk Stats and Stacks
- Using BPF Tools: Node and JVM USDT Probes
-
Writing BPF Tools:
setuidsnoop
-
Writing BPF Tools:
dbslower
- Writing BPF Tools: Contention Stats and Stacks
- Writing BPF Tools: From BCC GitHub Issues
-
Using
perf
Tools: Broken File Opens -
Using BPF Tools:
trace
andargdist
One-Liners - Using BPF Tools: CPU and Off-CPU Investigation
-
Using
perf
Tools: Slow File I/O - Using BPF Tools: Node Blocked Time Analysis
- Using BPF Tools: Node Garbage Collections
- Using BPF Tools: Node File Opens
- Using BPF Tools: Node Slow MySQL Queries
- Node Profiling with V8
-
Node Core Dump Analysis with
llnode
- Node Memory Leak Analysis
- Node Slow HTTP Requests
- Node Slow DNS
- Node Leaky Slowdown
(C) Sasha Goldshtein, 2015-2017. All rights reserved.