Tracing in Linux

Presentations

Tracing in Linux

Native apps tracing

Structure

╔══════════╗
║          ║
║ app.bin. ║
║          ║
╚══════════╝
     │
     │
     ↓
╔══════════╗
║          ║
║  glibc   ║
║          ║
╚══════════╝
     │
     │
     ↓
╔══════════╗
║          ║
║  kernel  ║
║          ║
╚══════════╝

What to trace?

╔══════════╗
║          ║..... gdb
║ app.bin. ║
║          ║..... SystemTap
╚══════════╝
     │
     │...... ltrace
     ↓
╔══════════╗
║          ║..... gdb
║  glibc   ║
║          ║..... SystemTap
╚══════════╝
     │
     │...... strace
     ↓
╔══════════╗
║          ║..... SystemTap, bpftrace
║  kernel  ║
║          ║..... KGDB
╚══════════╝

Utility ltrace

Examples

Usage

Utility strace

Usage

Next time