netdata / netdata/kernel-collector

CPU statistics using eBPF

Open
#247 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
67
Forks
14
PR merge metrics
No merged PRs in 30d

Description

@thiagoftsm commented on Mon Mar 09 2020

Feature idea summary

During the spike #7885 , it was identified that we can bring CPU monitoring using perf events like the command perf does. And considering what we have as output from this command, it is possible to say that we can bring a general CPU statistic using perf events.

Expected behavior

To have new charts that will demonstrate the following information per PID:


       1920.159821 task-clock                #    0.991 CPUs utilized          
                13 context-switches          #    0.007 K/sec                  
                 0 CPU-migrations            #    0.000 K/sec                  
               258 page-faults               #    0.134 K/sec                  
     5,649,595,479 cycles                    #    2.942 GHz                     [83.43%]
     1,808,339,931 stalled-cycles-frontend   #   32.01% frontend cycles idle    [83.54%]
     1,171,884,577 stalled-cycles-backend    #   20.74% backend  cycles idle    [66.77%]
     8,625,207,199 instructions              #    1.53  insns per cycle        
                                             #    0.21  stalled cycles per insn [83.51%]
     1,488,797,176 branches                  #  775.351 M/sec                   [82.58%]
        53,395,139 branch-misses             #    3.59% of all branches         [83.78%]

Ths example was extracted from http://brendangregg.com/perf.html#CPUstatistics

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing spike #7885 and the linked perf CPU statistics reference to understand the proposed event set. The issue names no files or tests, so first locate the relevant eBPF collector entry points. Done means adding per-PID charts for the listed CPU, scheduling, memory, cycle, instruction, branch, and miss statistics.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
observability, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.