Git Product home page Git Product logo

linux-tracing-workshop's Introduction

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

  1. Linux 4.6+ (the distribution doesn't matter; tested on Ubuntu and Fedora Core)
  2. perf
  3. perf-map-agent
  4. FlameGraph
  5. perf-tools
  6. bcc
  7. OpenJDK
  8. The systemtap-sdt-dev package on Ubuntu or the systemtap-sdt-devel package on Fedora/RHEL
  9. Node.js built from source with configure --with-dtrace
  10. MySQL or MariaDB built from source with -DENABLE_DTRACE=1
  11. PostgreSQL built from source with configure --enable-dtrace
  12. 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:

  1. 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)
  2. Enter the classroom token (four characters) provided by the instructor to join the classroom
  3. Navigate to the Lab tab (fourth from the top, the icon that looks like a test tube) to get your EC2 instance started

Labs

  1. Probing Tracepoints with ftrace
  2. CPU Sampling with perf and Flame Graphs
  3. Using BPF Tools: Broken File Opens
  4. Using BPF Tools: Slow File I/O
  5. Using BPF Tools: Chasing a Memory Leak
  6. Using BPF Tools: Database and Disk Stats and Stacks
  7. Using BPF Tools: Node and JVM USDT Probes
  8. Writing BPF Tools: setuidsnoop
  9. Writing BPF Tools: dbslower
  10. Writing BPF Tools: Contention Stats and Stacks
  11. Writing BPF Tools: From BCC GitHub Issues
  12. Using perf Tools: Broken File Opens
  13. Using BPF Tools: trace and argdist One-Liners
  14. Using BPF Tools: CPU and Off-CPU Investigation
  15. Using perf Tools: Slow File I/O
  16. Using BPF Tools: Node Blocked Time Analysis
  17. Using BPF Tools: Node Garbage Collections
  18. Using BPF Tools: Node File Opens
  19. Using BPF Tools: Node Slow MySQL Queries
  20. Node Profiling with V8
  21. Node Core Dump Analysis with llnode
  22. Node Memory Leak Analysis
  23. Node Slow HTTP Requests
  24. Node Slow DNS
  25. Node Leaky Slowdown

(C) Sasha Goldshtein, 2015-2017. All rights reserved.

linux-tracing-workshop's People

Contributors

adrianlzt avatar alexrs avatar falkenbt avatar goldshtn avatar jasonltaylor avatar johnk-novu avatar johnlunney avatar lieberbarry avatar sharmaansh21 avatar tekumara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux-tracing-workshop's Issues

Container-based labs

It would be good to cover a few container-specific examples in the labs:

  • Container utilization monitoring
  • CPU profiling per container, throttling issues
  • Tracing network issues
  • Database query tracing when the app and the database are in separate containers

matexp.cc cannot compile with g++

When I compile the matexp.cc with g++ I get belows errors.

[mbilgen@centos7 linux-tracing-workshop]$ g++  matexp.cc -g -o matexp
matexp.cc: In member function ‘matrix<T> matrix<T>::operator+(const matrix<T>&) const’:
matexp.cc:26:19: error: ‘invalid_argument’ is not a member of ‘std’
             throw std::invalid_argument("matrix dimensions don't match");
                   ^
matexp.cc:27:14: error: ‘result’ does not name a type
         auto result = *this;
              ^
matexp.cc:30:28: error: there are no arguments to ‘result’ that depend on a template parameter, so a declaration of ‘result’ must be available [-fpermissive]
                 result(i, j) += other(i, j);
                            ^
matexp.cc:30:28: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
matexp.cc:31:16: error: ‘result’ was not declared in this scope
         return result;
                ^
matexp.cc: In member function ‘matrix<T> matrix<T>::operator*(const matrix<T>&) const’:
matexp.cc:35:19: error: ‘invalid_argument’ is not a member of ‘std’
             throw std::invalid_argument("multiplication implemented only "
                   ^
matexp.cc:38:19: error: ‘invalid_argument’ is not a member of ‘std’
             throw std::invalid_argument("matrix dimensions don't match");
                   ^
matexp.cc: In constructor ‘exponentiator<T>::exponentiator(matrix<T>, int)’:
matexp.cc:55:14: error: ‘move’ is not a member of ‘std’
         mat_(std::move(mat)), exponent_(exp) {
              ^
matexp.cc: In member function ‘matrix<T> exponentiator<T>::operator()()’:
matexp.cc:58:14: error: ‘a’ does not name a type
         auto a = mat_;
              ^
matexp.cc:60:13: error: ‘a’ was not declared in this scope
             a = a * mat_;
             ^
matexp.cc:62:16: error: ‘a’ was not declared in this scope
         return a;
                ^
matexp.cc: In member function ‘matrix<float> io::read()’:
matexp.cc:72:19: error: ‘invalid_argument’ is not a member of ‘std’
             throw std::invalid_argument("unable to open input file");
                   ^
matexp.cc:77:23: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
         matrix<float> res{ rows, cols };
                       ^
matexp.cc:77:39: error: in C++98 ‘res’ must be initialized by constructor, not by ‘{...}’
         matrix<float> res{ rows, cols };
                                       ^
matexp.cc: In member function ‘void io::exp_to(std::string, int)’:
matexp.cc:96:14: error: ‘mat’ does not name a type
         auto mat = read();
              ^
matexp.cc:97:34: error: ‘mat’ was not declared in this scope
         exponentiator<float> exp(mat, rounds);
                                  ^
matexp.cc: In function ‘int main(int, char**)’:
matexp.cc:112:26: error: ‘atoi’ is not a member of ‘std’
     prog.exp_to(argv[3], std::atoi(argv[2]));
                          ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.