This article will guide you through the steps to monitor Linux performance, networking and much more using BCC (BPF Compiler Collection) and BPF () dynamic tracing tools.
Installing BCC on Linux Machines
To begin with the installation, first you need to compile linux kernel with the flags set as below:
To verify your linux kernel flags, view the file /proc/config.gz or execute the following commands:
Once done verifying kernel flags, start installing BCC tools on your Linux machines.
Installing BCC on Ubuntu 16.04
Installation steps are very straightforward. You don't need to upgrade kernel or compile it from source.
Installing BCC on Ubuntu 14.04
Once reboot completed, run the following commands to install signed BCC packages:
Installing BCC On Arch Linux – AUR
You need to upgrade its kernel to at least version 4.3.1-1, and then install the packages below using any Arch package managers such as pacaur, yaourt, cower, etc.
Using BCC Tools in Linux
All the tools are installed under
/usr/share/bcc/toolsdirectory. However, you can alternatively run them from the repository under
/toolswhere they end with a
.pyextension. We will show you a few examples under – monitoring general Linux system's performance and networking.
Trace Slow ext4 Operations
Trace Page Cache hit/miss Ratio
Trace TCP Active Connections
Trace Failed exec()s Syscalls
Trace Particular Process Functions
Published: September 10, 2016 | Last Updated: January 27, 2017