Skip to content

Instantly share code, notes, and snippets.

@fsoppelsa
Last active December 21, 2020 11:32
Show Gist options
  • Select an option

  • Save fsoppelsa/f94d9c06f21669d7dd0e39107c7edd04 to your computer and use it in GitHub Desktop.

Select an option

Save fsoppelsa/f94d9c06f21669d7dd0e39107c7edd04 to your computer and use it in GitHub Desktop.
Install some essential performance tools
# Install perf tools (Fedora, RHEL)
# ansible-playbook -i 192.168.100.12, playbooks/perftools.yml
#
# 10 essential tools:
# uptime
# dmesg | tail
# vmstat 1
# mpstat -P ALL 1
# pidstat 1
# iostat -xz 1
# free -m
# sar -n DEV 1
# sar -n TCP,ETCP 1
# top
---
- name: Install tools
hosts: all
gather_facts: no
tasks:
- name: "Kernel version"
shell: uname -r | egrep '^[0-9]*\.[0-9]*\.[0-9]*' -o
register: kernel_version
- name: "Install bcc, bpf, perf, sysstat"
dnf:
name:
- bcc-tools
- sysstat
- bpftrace
- perf
- python3-libselinux.x86_64
- kernel-devel-{{ kernel_version.stdout }}
- flamegraph
- strace
state: latest
- name: "Setup shell environment"
lineinfile:
path: /root/.bashrc
line: "PATH=$PATH:/usr/share/bcc/tools/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment