GithubHelp home page GithubHelp logo

dmefs / bpftop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netflix/bpftop

0.0 0.0 0.0 1.87 MB

bpftop provides a dynamic real-time view of running eBPF programs. It displays the average runtime, events per second, and estimated total CPU % for each program.

License: Apache License 2.0

Rust 99.49% Makefile 0.14% Dockerfile 0.37%

bpftop's Introduction

bpftop

bpftop provides a dynamic real-time view of running eBPF programs. It displays the average runtime, events per second, and estimated total CPU % for each program. It also provides graphical views of these statistics over time. This tool minimizes overhead by enabling performance statistics only while it is active.

bpftop

Installation

To download the latest release of bpftop, use the following command:

curl -fLJ https://github.com/Netflix/bpftop/releases/latest/download/bpftop -o bpftop && chmod +x bpftop

Features

  • Displays a list of all running eBPF programs on the host, including the ID, type, and name
  • Shows the period and total average runtime for each eBPF program.
  • Calculates the events per second and estimated CPU utilization for each eBPF program
  • Provides a graphical view of the average runtime, events per second, and estimated CPU utilization over a 10-second time period
  • Dynamically updates the list every second
  • Enables the statistics-gathering function only while it is active

Prerequisites

  • bpftop requires sudo privileges to run.
  • The Linux kernel version must be 5.8 or later.
  • The binary is dynamically linked to libz and libelf, so these libraries must be present on the systems where you intend to run bpftop.

Usage

Run the following command to start bpftop on your host:

sudo ./bpftop

How it works

bpftop uses the BPF_ENABLE_STATS BPF syscall command to enable global eBPF runtime statistics gathering, which is disabled by default to reduce performance overhead. It collects these statistics every second, calculating the average runtime, events per second, and estimated CPU utilization for each eBPF program within that sample period. This information is displayed in a top-like tabular format. Once bpftop terminates, it disables the statistics-gathering function by deleting the file descriptor returned by BPF_ENABLE_STATS.

Building from source

  1. Install and setup cross
  2. Run cross build --release

bpftop's People

Contributors

jfernandez avatar pmcgleenon avatar dependabot[bot] avatar arnarpall avatar mtb0x1 avatar

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.