BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more

Related tags

Nix tools bcc
Overview

BCC Logo

BPF Compiler Collection (BCC)

BCC is a toolkit for creating efficient kernel tracing and manipulation programs, and includes several useful tools and examples. It makes use of extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature that was first added to Linux 3.15. Much of what BCC uses requires Linux 4.1 and above.

eBPF was described by Ingo Molnár as:

One of the more interesting features in this cycle is the ability to attach eBPF programs (user-defined, sandboxed bytecode executed by the kernel) to kprobes. This allows user-defined instrumentation on a live kernel image that can never crash, hang or interfere with the kernel negatively.

BCC makes BPF programs easier to write, with kernel instrumentation in C (and includes a C wrapper around LLVM), and front-ends in Python and lua. It is suited for many tasks, including performance analysis and network traffic control.

Screenshot

This example traces a disk I/O kernel function, and populates an in-kernel power-of-2 histogram of the I/O size. For efficiency, only the histogram summary is returned to user-level.

# ./bitehist.py
Tracing... Hit Ctrl-C to end.
^C
     kbytes          : count     distribution
       0 -> 1        : 3        |                                      |
       2 -> 3        : 0        |                                      |
       4 -> 7        : 211      |**********                            |
       8 -> 15       : 0        |                                      |
      16 -> 31       : 0        |                                      |
      32 -> 63       : 0        |                                      |
      64 -> 127      : 1        |                                      |
     128 -> 255      : 800      |**************************************|

The above output shows a bimodal distribution, where the largest mode of 800 I/O was between 128 and 255 Kbytes in size.

See the source: bitehist.py. What this traces, what this stores, and how the data is presented, can be entirely customized. This shows only some of many possible capabilities.

Installing

See INSTALL.md for installation steps on your platform.

FAQ

See FAQ.txt for the most common troubleshoot questions.

Reference guide

See docs/reference_guide.md for the reference guide to the bcc and bcc/BPF APIs.

Contents

Some of these are single files that contain both C and Python, others have a pair of .c and .py files, and some are directories of files.

Tracing

Examples:

Tools:

Networking

Examples:

BPF Introspection:

Tools that help to introspect BPF programs.

  • introspection/bps.c: List all BPF programs loaded into the kernel. 'ps' for BPF programs. Examples.

Motivation

BPF guarantees that the programs loaded into the kernel cannot crash, and cannot run forever, but yet BPF is general purpose enough to perform many arbitrary types of computation. Currently, it is possible to write a program in C that will compile into a valid BPF program, yet it is vastly easier to write a C program that will compile into invalid BPF (C is like that). The user won't know until trying to run the program whether it was valid or not.

With a BPF-specific frontend, one should be able to write in a language and receive feedback from the compiler on the validity as it pertains to a BPF backend. This toolkit aims to provide a frontend that can only create valid BPF programs while still harnessing its full flexibility.

Furthermore, current integrations with BPF have a kludgy workflow, sometimes involving compiling directly in a linux kernel source tree. This toolchain aims to minimize the time that a developer spends getting BPF compiled, and instead focus on the applications that can be written and the problems that can be solved with BPF.

The features of this toolkit include:

  • End-to-end BPF workflow in a shared library
    • A modified C language for BPF backends
    • Integration with llvm-bpf backend for JIT
    • Dynamic (un)loading of JITed programs
    • Support for BPF kernel hooks: socket filters, tc classifiers, tc actions, and kprobes
  • Bindings for Python
  • Examples for socket filters, tc classifiers, and kprobes
  • Self-contained tools for tracing a running system

In the future, more bindings besides python will likely be supported. Feel free to add support for the language of your choice and send a pull request!

Tutorials

Networking

At Red Hat Summit 2015, BCC was presented as part of a session on BPF. A multi-host vxlan environment is simulated and a BPF program used to monitor one of the physical interfaces. The BPF program keeps statistics on the inner and outer IP addresses traversing the interface, and the userspace component turns those statistics into a graph showing the traffic distribution at multiple granularities. See the code here.

Screenshot

Contributing

Already pumped up to commit some code? Here are some resources to join the discussions in the IOVisor community and see what you want to work on.

External links

Looking for more information on BCC and how it's being used? You can find links to other BCC content on the web in LINKS.md.

Comments
  • USDT probes

    USDT probes

    User-level statically defined tracing probes have been placed in various applications and runtimes, including Java, Node.js, MySQL, and PostgreSQL. These allow API-stable scripts to be written, that do not depend on tracing raw user-level functions (uprobes).

    As an example of hacking in USDT tracing using ftrace, see: http://www.brendangregg.com/blog/2015-07-03/hacking-linux-usdt-ftrace.html . The unpublished script I referred to is: https://gist.github.com/brendangregg/f1b3d09c14088522065b

    For a simple example to trace:

    1. Create tick-dtrace.d:
    provider tick {
            probe loop(int);
    }
    
    #pragma D attributes Evolving/Evolving/ISA provider node provider
    #pragma D attributes Private/Private/Unknown provider node module
    #pragma D attributes Private/Private/Unknown provider node function
    #pragma D attributes Private/Private/ISA provider node name
    #pragma D attributes Evolving/Evolving/ISA provider node args
    
    2. Then create an object file:
    # apt-get install -y systemtap-sdt-dev        # adds "dtrace"
    # dtrace -G -s tick-dtrace.d -o tick-dtrace.o
    
    3. Create the target program, tick-main.c:
    #include <stdio.h>
    #include <unistd.h>
    /* from systemtap-sdt */
    #include <sys/sdt.h>
    
    int
    main(int argc, char *argv[])
    {
            int i;
    
            for (i = 0; i < 5; i++) {
                    DTRACE_PROBE1(tick, loop, i);
                    printf("hi: %d\n", i);
                    sleep(1);
            }
    
            return (0);
    }
    
    4. Compile tick-main:
    gcc -c tick-main.c
    gcc -o tick tick-main.o tick-dtrace.o
    
    5. Check it has USDT probes:
    readelf -n tick
    
    Notes at offset 0x0000021c with length 0x00000020:
      Owner                 Data size       Description
      GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
        OS: Linux, ABI: 2.6.35
    
    Notes at offset 0x0000023c with length 0x00000024:
      Owner                 Data size       Description
      GNU                  0x00000014       NT_GNU_BUILD_ID (unique build ID bitstring)
        Build ID: 2b94c0e7c684a001a34d685c862b33aa51ff7672
    
    Notes at offset 0x00000a08 with length 0x00000044:
      Owner                 Data size       Description
      stapsdt              0x0000002e       NT_STAPSDT (SystemTap probe descriptors)
        Provider: tick
        Name: loop
        Location: 0x0000000000400558, Base: 0x0000000000400628, Semaphore: 0x0000000000000000
        Arguments: -4@-4(%rbp)
    

    See NT_STAPSDT etc.

    This is a basic probe. There is another type, isenabled, which I discussed in the blog post, and requires a semaphore to activate.

    prio:high 
    opened by brendangregg 55
  • Add support for remote target devices via BPFd

    Add support for remote target devices via BPFd

    Overview

    These patches add features that allow BCC to support cross-development workflows where the development machine and the target machine running the BPF program are different.

    This is achieved by integrating the BPFd (BPF Daemon) project into BCC. BPFd is a standalone executable that can be loaded onto a remote target device, and which then can act as a proxy for BCC for whenever BCC wishes to perform an operation on the system (e.g. load BPF programs, read /proc/kallsyms, attach kprobes, etc.).

    Through this arrangement, BCC can be used to profile a remote target device while it mostly runs on a separate host machine. The advantage of this arrangement is that it removes the need to have kernel sources and the LLVM stack on the target machine. These can, instead, be kept on the host. This arrangement therefore reduces the space required on a target for BCC tools to run, which is a key benefit for devices that have a more limited disk space (e.g. embedded devices).

    In addition, the above set-up also allows embedded developers who use a cross-compiler in their workflow to run clang on a different architecture than the target's architecture, thus facilitating cross-compilation development.

    For more information, please check out this LWN article which explains the purpose of BPFd and how it works in more detail.

    Integration of BPFd sources into BCC

    These patches add the sources for the BPFd executable into the BCC source tree. This is done to ensure that BCC and BPFd remain compatible with each other.

    BPFd depends on existing BCC components such as libbpf.c and bcc_syms.cc to function. However, the converse is also true: BCC makes calls to BPFd via BCC's Python interface. The Python interface is the main way by which communication happens between BCC and BPFd, and so any changes there could break interoperability. As a result, it is not sufficient for BPFd to just use libbcc and remain independent like other projects (e.g. bpftrace).

    Therefore, to ensure that BCC and BPFd are always compatible with each other, it is more feasible to keep them in the same tree instead of keeping them separate. This is also why these patches come with smoke tests which ensure that the interoperability between BCC and BPFd isn't broken silently when changes are made to either.

    Tools

    The tools that currently work for remote devices with these patches are as follows:

    • Biolatency
    • Biosnoop
    • Biotop
    • Cachestat
    • Cachetop
    • Filetop
    • Hardirqs
    • Offcputime
    • Opensnoop
    • Profile
    • Runqlen
    • Stackcount
    • Syscount
    • Trace

    Reviewed-by: Joel Fernandes ([email protected])

    opened by jcanseco 54
  • Kernel tracepoint support (ugly)

    Kernel tracepoint support (ugly)

    I understand that adding kernel tracepoint support in BPF is going to take a while. In the meantime, would it be possible to put together a tool that relies on kprobes? What I had in mind was to enable the tracepoint using ftrace and then place a kprobe in the trace_event_raw_event_* function or in trace_event_buffer_commit, or some similar location. The kprobe would have access to the entry structure defined by TRACE_EVENT.

    Is that a direction worth pursuing? Would it be possible (for efficiency) to instruct the ftrace infrastructure to discard the event and not even put it in the ftrace buffer?

    opened by goldshtn 51
  • Use /proc/[pid]/root when looking at /proc/[pid]/maps paths

    Use /proc/[pid]/root when looking at /proc/[pid]/maps paths

    I recently ran into a problem when trying to attach to a USDT in a shared library. Specifically, the shared library was loaded into the address space of a chrooted process. If I just provide the pid of this process, initializing USDT object fails because all paths in /proc/[pid]/maps for the target are relative to its chroot, while the process I'm trying to attach from is not in a chroot and therefore the paths don't make sense and USDT initialization can't look through shared lib ELFs to find the right probe.

    Similarly, if I try to initialize the USDT object with pid and bin_path to the shared lib, initialization succeeds but actually attaching fails: address lookup for the usdt's semaphore in pid's address space fails because /proc/[pid]/maps shared lib path is expected to match provided bin_path exactly, but maps paths are chroot-relative so this doesn't work.

    Implementation evolved significantly since this PR was created, look at this comment for details about impl.

    opened by davemarchevsky 50
  • usdt probes requiring semaphore cannot be used on google container OS

    usdt probes requiring semaphore cannot be used on google container OS

    This isn't necessarily a bug in bcc per se, more a write-up of what doesn't work and why - hopefully it will at least help others from going down the rabbit hole I did.

    There may be a way for bcc to fix this by finding another way to increment the semaphore, but I don't really see how.

    In the chromium kernel source code, here is code in fs/proc/base.c that prevents processes from writing to their own memory maps for security reasons:

    static ssize_t mem_write(struct file *file, const char __user *buf,
           size_t count, loff_t *ppos)
    {
    #ifdef CONFIG_SECURITY_CHROMIUMOS_READONLY_PROC_SELF_MEM
      return -EACCES;
    #else
      return mem_rw(file, (char __user*)buf, count, ppos, 1);
    #endif
    }
    

    This variable is enabled by default in the kernel used by container OS, such as in google's GKE offering: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/overlay-lakitu/sys-kernel/lakitu-kernel-4_14/files/base.config#3016

    This means that anyone trying to use bcc on a chromium derived OS, and especially anyone trying to use bcc on GKE, will probably also hit this if they try to use usdt probes.

    During the process of enabling a usdt probe, some probes need to be enabled by writing to a semaphore - this isn't true of all usdt probes, but is probably true of many (I ran into this with ruby's usdt probes). As the dtrace docs indicate, this is a means to avoid expensive processing around the probe, only adding this extra info/processing if the probe is enabled.

    The code that handles this in bcc is here: https://github.com/iovisor/bcc/blob/c2e2a26b8624492018a14d5eebd4a50b869c911f/src/cc/usdt/usdt.cc#L109-L113

    And it is essentially the same as the approach described here.

    However, this leads to probes silently failing to be enabled if run against a kernel with the above hardening. Using strace, it is obvious why it fails:

    openat(AT_FDCWD, "/proc/726288/mem", O_RDWR) = 72
    lseek(72, 94200854600568, SEEK_SET)     = 94200854600568
    read(72, "\0\0", 2)                     = 2
    lseek(72, 94200854600568, SEEK_SET)     = 94200854600568
    write(72, "\1\0", 2)                    = -1 EACCES (Permission denied)
    close(72)                               = 0
    

    Note that this only will happen for probes where readelf --notes indicates a value for the sempahore:

      stapsdt              0x00000059       NT_STAPSDT (SystemTap probe descriptors)
        Provider: ruby
        Name: cmethod__entry
        Location: 0x000000000019999d, Base: 0x00000000002d8ec0, Semaphore: 0x000000000052bb54
        Arguments: 8@32(%rsp) 8@40(%rsp) 8@48(%rsp) -4@56(%rsp)
    

    As there actually is a sempahore indicated here, this USDT probe would be affected. A similar probe in libc would not be affected and can be attached to as the semaphore is not required for the "enable" mechanism:

      stapsdt              0x0000003c       NT_STAPSDT (SystemTap probe descriptors)
        Provider: libc
        Name: memory_heap_free
        Location: 0x000000000019bfd0, Base: 0x00000000001bdd48, Semaphore: 0x0000000000000000
        Arguments: 8@%r11 8@%rax
    
    opened by dalehamel 37
  • Can't use syscall tracepoints

    Can't use syscall tracepoints

     # ./tools/trace.py t:syscalls:sys_enter_newfstat
    Ioctl(PERF_EVENT_IOC_SET_BPF): Invalid argument
    Failed to attach BPF to tracepoint
    

    Here's newfstat.py:

    #!/usr/bin/python
    
    from __future__ import print_function
    from bcc import BPF
    
    # load BPF program
    b = BPF(text="""
    TRACEPOINT_PROBE(syscalls, sys_enter_newfstat) {
        bpf_trace_printk("%d\\n", args->fd);
        return 0;
    };
    """, debug=0)
    
    # header
    print("%-18s %-16s %-6s %s" % ("TIME(s)", "COMM", "PID", "FD"))
    
    # format output
    while 1:
        try:
            (task, pid, cpu, flags, ts, msg) = b.trace_fields()
        except ValueError:
            continue
        print("%-18.9f %-16s %-6d %s" % (ts, task, pid, msg))
    

    output:

    # ./newfstat.py 
    ioctl(PERF_EVENT_IOC_SET_BPF): Invalid argument
    Traceback (most recent call last):
      File "./newfstat.py", line 12, in <module>
        """, debug=0)
      File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 212, in __init__
        self._trace_autoload()
      File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 767, in _trace_autoload
        self.attach_tracepoint(tp=tp, fn_name=fn.name)
      File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 585, in attach_tracepoint
        raise Exception("Failed to attach BPF to tracepoint")
    Exception: Failed to attach BPF to tracepoint
    

    Testing on 4.8-rc4. Same problem with other syscall tracepoints.

    I can use kprobes as a workaround in the meantime, but this should be a nice example of using tracepoints...

    opened by brendangregg 34
  • Do not assume any code-tables on strings

    Do not assume any code-tables on strings

    Scripts should never assume what codetable an external user has and try to decode. Doing that has huge potential to cause pain and misery for users (a common python3 sickness nowadays). A better option is for python3-users to live with b'' syntax or provide an option --decode=xxx to each script.

    Revert "Python 3 compatibility fixes around string handling (#986)" This reverts commit 78948e4aae6aa0d06806d452d193320936d59dc7.

    The offending patch produces the following test failure on Jessie with backports 4.9 kernel:

    Traceback (most recent call last): File "../../tools/slabratetop.py", line 123, in print("%-32s %6d %10d" % (k.name.decode(), v.count, v.size)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc1 in position 2: ordinal not in range(128)

    opened by torgil 32
  • Location of the kernel headers

    Location of the kernel headers

    I am trying to run bcc on openSUSE Linux and there is a problem with the kernel header path it seems:

    > ./hello_world.py
    In file included from <built-in>:316:
    <command line>:2:10: fatal error: './include/linux/kconfig.h' file not found
    #include "./include/linux/kconfig.h"
             ^
    1 error generated.
    Traceback (most recent call last):
      File "./hello_world.py", line 11, in <module>
        BPF(text='void kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); }').trace_print()
      File "/usr/local/lib/python2.7/site-packages/bcc/__init__.py", line 126, in __init__
        raise Exception("Failed to compile BPF module %s" % src_file)
    Exception: Failed to compile BPF module
    

    The file exists at /usr/src/linux/include/linux/kconfig.h , I am wondering if there is a special setup I should be doing before using bcc.

    opened by ismail 32
  • argdist.py: Trace a function and its parameters into a histogram or frequency count

    argdist.py: Trace a function and its parameters into a histogram or frequency count

    gentrace.py attaches to functions and traces their parameter values into a histogram or a raw data collection. A simple command-line syntax specifies the probe point, the parameter values to capture, and whether a histogram or raw data is desired.

    From the examples -- print a histogram of buffer sizes passed to write() across all processes, where the file descriptor was 1 (STDOUT):

    # ./gentrace.py "hist:c:write(int fd, const void *buf, size_t count):size_t:count:fd==1"
    [11:25:28]
    hist:c:write(int fd, const void *buf, size_t count):size_t:count:fd==1
         count               : count     distribution
             0 -> 1          : 0        |                                        |
             2 -> 3          : 0        |                                        |
             4 -> 7          : 0        |                                        |
             8 -> 15         : 1        |****************************************|
            16 -> 31         : 0        |                                        |
            32 -> 63         : 0        |                                        |
            64 -> 127        : 1        |****************************************|
    [11:25:29]
    hist:c:write(int fd, const void *buf, size_t count):size_t:count:fd==1
         count               : count     distribution
             0 -> 1          : 0        |                                        |
             2 -> 3          : 0        |                                        |
             4 -> 7          : 0        |                                        |
             8 -> 15         : 2        |********                                |
            16 -> 31         : 0        |                                        |
            32 -> 63         : 1        |****                                    |
            64 -> 127        : 9        |****************************************|
    [11:25:30]
    hist:c:write(int fd, const void *buf, size_t count):size_t:count:fd==1
         count               : count     distribution
             0 -> 1          : 0        |                                        |
             2 -> 3          : 0        |                                        |
             4 -> 7          : 0        |                                        |
             8 -> 15         : 3        |*******                                 |
            16 -> 31         : 0        |                                        |
            32 -> 63         : 2        |****                                    |
            64 -> 127        : 17       |****************************************|
    
    opened by goldshtn 32
  • PID filtering issues when running bpf script inside container

    PID filtering issues when running bpf script inside container

    When running tools/funccount.py inside a container, we discovered that no func counting actually happened.

    Further investigation shows the reason is due to the pid filtering like below:

        u32 pid = bpf_get_current_pid_tgid() >> 32;
        if (pid != <pid_arg_passed_in>) { return 0; }
    

    The <pid_arg_passed_in> is typically the pid of a process to be traced inside the container. On the other hand, bpf_get_current_pid_tgid() in the kernel will get the pid outside the container. Such a mismatch will cause pid != <pid_arg_passed_in> evaluated to be true, and bpf program returns 0 prematurely.

    Most of our bcc tools have pid based filtering. That means most of them will not run properly inside the container.

    How to resolve the issue? I can think of two options: (1). Have one more option in each of the tools which have pid as its arguments. This option will specify host pid, the program will take this pid in the bpf pid filtering if it is available. Users can get the host pid by using ps command on the host. (2). Invent new kernel helpers to: . helper 1: get namespace id of the current process . helper 2: pass in the process id and namespace id and get back true if the the current process is the one having the same <ns_id, pid_inside_ns>.

    Any comments or suggestions? cc @brendangregg @goldshtn @4ast

    opened by yonghong-song 28
  • GitHub actions

    GitHub actions

    Run BCC test suite with github actions
    
    With this commit, pushes to branches can trigger tests directly on
    Github Actions.
    
    Here it will be able to test against kernel 4.14 and 5.0.0, which correspond
    to the latest Ubuntu LTS kernel releases.
    
    Tests are run for both Debug and Release modes.
    
    Tests run inside docker, in an ubuntu 19.04 container base.
    
    For the github workflow:
    
    - The test_libbcc suite is run first, to potentially fail fast on these faster
    unit tests.
    - The Python test suite is run
    
    Some of these tests are allowed to fail, but the failure is still reported:
    
    - In catch2 tests, using the [!mayfail] tag, where this will be displayed in
    the test summary
    - In Python unittests, using the `@mayFail("Reason")` decorator, which is
    introduce for consistency with catch2. These will report the reason for the
    failure, and log this to an artifact of the test.
    

    test_libbcc

    Currently this appears to actually be running more test cases than on jenkins:

    test cases:   37 |   35 passed | 2 failed
    assertions: 2414 | 2412 passed | 2 failed
    

    But on jenkins for libbcc I see:

    3: test cases:  37 |  36 passed | 1 failed
    3: assertions: 626 | 624 passed | 2 failed
    

    Python tests

    There are a few python tests that needed to be skipped for now with @mayFail. Fixing these I think is outside of the scope of adding github actions, and these failures seem to be legitimate.

    These failures are summarized as part of the action run, and the logs are explicitly added as an artifact. An issue should be cut to fix these up once this is merged.

    opened by dalehamel 27
  • tools/ttysnoop: Add ITER_UBUF support

    tools/ttysnoop: Add ITER_UBUF support

    Since kernel commit fcb14cb1bdac("new iov_iter flavour - ITER_UBUF"), tty_write() will use ITER_UBUF. If do not add support for ITER_UBUF, ttysnoop will not work

    opened by Rtoax 0
  • undefined reference to `getPollyPluginInfo() with ubuntu 20.04

    undefined reference to `getPollyPluginInfo() with ubuntu 20.04

    I have linking problem if I want to build the tree after installing the described dependencies. I have ubuntu 20.04 installed and some dependencies failed ;-( E: Unable to locate package libllvm14 E: Unable to locate package llvm-14-dev E: Unable to locate package libclang-14-dev ... E: Unable to locate package libllvm3.7 E: Couldn't find any package by glob 'libllvm3.7' E: Couldn't find any package by regex 'libllvm3.7' E: Unable to locate package llvm-3.7-dev E: Couldn't find any package by glob 'llvm-3.7-dev' E: Couldn't find any package by regex 'llvm-3.7-dev' E: Unable to locate package libclang-3.7-dev E: Couldn't find any package by glob 'libclang-3.7-dev' E: Couldn't find any package by regex 'libclang-3.7-dev'

    When I try to build the tools I get the following error: [ 36%] Built target bcc_py_python3 [ 36%] Built target bcc-lua [ 36%] Built target bps [ 36%] Linking CXX executable CGroupTest /usr/bin/ld: /usr/lib/llvm-10/lib/libclangCodeGen.a(BackendUtil.cpp.o): in function (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >)': (.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x1f15): undefined reference togetPollyPluginInfo()' collect2: error: ld returned 1 exit status make[2]: *** [examples/cpp/CMakeFiles/CGroupTest.dir/build.make:158: examples/cpp/CGroupTest] Error 1 make[1]: *** [CMakeFiles/Makefile2:1087: examples/cpp/CMakeFiles/CGroupTest.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

    Any Idea how I can fix that? I saw that those packages are not available for ubuntu 20.04.

    Thanks in advance. BR, Erwin

    opened by ErwinBuysse1972 0
  • libbpf-tools/softirqs: Add event counts report

    libbpf-tools/softirqs: Add event counts report

    Currently softirq only report the time but not the event counts. If we have both time and counts it will be better understand the frequency and duration of events.

    Signed-off-by: Hailong Liu [email protected]

    opened by suiya001 0
  • libbpf-tools:some demo tools excute failed!such as biotop tcpstaus filetop....

    libbpf-tools:some demo tools excute failed!such as biotop tcpstaus filetop....

    Hi,when i made and installed these tools in my aarch-64 OS,I got these problem: BIOTOP image image image FILETOP image image TCPSTATUS image image image ... I try to take some measures but not useful,please help me,thanks! PS1: my OS info: Linux e04-g4 5.10.110-yocto-standard #1 SMP PREEMPT Tue Jan 3 09:00:28 UTC 2023 aarch64 GNU/Linux PS2: my kernel config: `CONFIG_TASKS_TRACE_RCU=y CONFIG_BPF_SYSCALL=y CONFIG_TRACEPOINTS=y CONFIG_UPROBES=y CONFIG_BINARY_PRINTF=y

    CONFIG_DEBUG_INFO_BTF=y CONFIG_STACKTRACE=y CONFIG_NOP_TRACER=y CONFIG_RING_BUFFER=y CONFIG_EVENT_TRACING=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_TRACING=y CONFIG_FTRACE=y CONFIG_FTRACE_SYSCALLS=y CONFIG_BRANCH_PROFILE_NONE=y CONFIG_UPROBE_EVENTS=y CONFIG_BPF_EVENTS=y CONFIG_DYNAMIC_EVENTS=y CONFIG_PROBE_EVENTS=y CONFIG_CGROUP_BPF=y CONFIG_SOCK_CGROUP_DATA=y CONFIG_BPF_LSM=y CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_USERMODE_DRIVER=y CONFIG_KPROBES=y CONFIG_KRETPROBES=y CONFIG_BPF_STREAM_PARSER=y CONFIG_STREAM_PARSER=y CONFIG_NET_SOCK_MSG=y CONFIG_KPROBE_EVENTS=y CONFIG_FUNCTION_ERROR_INJECTION=y CONFIG_DEBUG_FS=y CONFIG_KPROBES_ON_FTRACE=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y CONFIG_FTRACE_MCOUNT_USE_CC=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y

    #third CONFIG_NET_CLS_BPF=m CONFIG_NET_ACT_BPF=m CONFIG_LWTUNNEL=y CONFIG_LWTUNNEL_BPF=y

    #fourth CONFIG_IKHEADERS=y CONFIG_HAVE_BPF_JIT=y CONFIG_BPF_JIT=y CONFIG_HAVE_EBPF_JIT=y CONFIG_DEBUG_INFO=y

    CONFIG_NETFILTER_XT_MATCH_BPF=m CONFIG_BPF_KPROBE_OVERRIDE=y

    opened by LinuxVWQH 5
  • BCC fails to attach uprobes by virtual address for PIE binaries.

    BCC fails to attach uprobes by virtual address for PIE binaries.

    For PIE binaries, BCC fails to attach uprobes by virtual address. To demonstrate the issue, we provide the following self contained repo: https://github.com/etep/pie-bcc-issue

    Note that uprobe attach by binary address, i.e. the address as found in the ELF file by nm e.g. works fine.

    We would like feedback on the following:

    1. should uprobe attach support virtual address for PIE binaries?
    2. if yes, should there be a separate interface, e.g.: attach_uprobe_by_virtual_address and attach_uprobe_by_binary_address?

    We would be open to authoring a PR to resolve the issue, pursuant to decisions on the previous two questions. Also, would work with the BCC authors to ensure the PR is consistent with BCC coding practices and best practices.

    opened by etep 2
  • bcc: Fix multi-word array type handling

    bcc: Fix multi-word array type handling

    A recent change caused arrays of multi-word types to not be detected properly leading to errors such as:

    Type: 'unsigned char[256]' not recognized. Please define the data with ctypes manually

    Fix the regular expression to allow multi-word types in arrays.

    Fixes: ca1d3fd07a84 ("bcc: Fix array type handling due to llvm changes") Cc: [email protected] Signed-off-by: Adrian Moreno [email protected]

    opened by amorenoz 1
Releases(v0.26.0)
Owner
IO Visor Project
IO Visor Project
Performance monitoring and benchmarking suite

Introduction Likwid is a simple to install and use toolsuite of command line applications and a library for performance oriented programmers. It works

null 1.3k Dec 28, 2022
Performance analysis tools based on Linux perf_events (aka perf) and ftrace

perf-tools A miscellaneous collection of in-development and unsupported performance analysis tools for Linux ftrace and perf_events (aka the "perf" co

Brendan Gregg 8.8k Dec 28, 2022
A virtual Linux shell environment application for Android OS. Runs Alpine Linux in QEMU system emulator. Termux app fork.

vShell (Virtual Shell) — a successor of Termux project which provides an alternate implementation of the Linux terminal emulator for Android OS.

null 2 Feb 1, 2022
Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis

AndroidResourceManager Cross-Platform tools to manage your resources as an Android Developer, AndroidResourceManager - ARM provide five main services

Amr Hesham 26 Nov 16, 2022
For English vocabulary analysis and sentence analysis in natural language, model trainin

Sword Come ?? For English vocabulary analysis and sentence analysis in natural language, model training, intelligent response and emotion analysis rea

James Zow 2 Apr 9, 2022
ThirdEye is an integrated tool for realtime monitoring of time series and interactive root-cause analysis.

ThirdEye is an integrated tool for realtime monitoring of time series and interactive root-cause analysis. It enables anyone inside an organization to collaborate on effective identification and analysis of deviations in business and system metrics. ThirdEye supports the entire workflow from anomaly detection, over root-cause analysis, to issue resolution and post-mortem reporting.

null 87 Oct 17, 2022
Terminal GUI library for simple ANSI console tools and graphical interfaces with Windows/Linux support

TerminalCore Terminal GUI library for Windows/Linux. This library contains all colors as ascii codes, native functions of the respective operating sys

Pascal 3 Oct 19, 2022
Automon combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively monitor your Java code, the JDK, and 3rd party libraries.

Automon Automon combines the power of AOP (AspectJ) with monitoring tools or logging tools that you already use to declaratively monitor the following

Steve Souza 561 Nov 27, 2022
Small set of tools for JVM troublshooting, monitoring and profiling.

Swiss Java Knife (SJK) SJK is a command line tool for JVM diagnostic, troubleshooting and profiling. SJK exploits standard diagnostic interfaces of JV

Alexey Ragozin 3.2k Jan 3, 2023
Java - Packet Analyzer Application based on Java, Networking and Swing UI

Network-Packet-Tracer-using-Java Java - Packet Analyzer / Sniffing System Application based on Java, Networking and Swing UI Java - Packet Analyzer Ap

Muhammad Asad 6 Feb 3, 2022
An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.

Micrometer Application Metrics An application metrics facade for the most popular monitoring tools. Instrument your code with dimensional metrics with

Micrometer Metrics 3.7k Dec 30, 2022
This is the VapeCloud project, it is a Minecraft Dynamic CloudSystem based on Nio-Networking.

This is the VapeCloud project, it is a Minecraft Dynamic CloudSystem based on Nio-Networking. IMPORTENT: this Cloudsystem is still in Development Requ

RauchigesEtwas 2 Dec 19, 2022
Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.

Zuul Zuul is an L7 application gateway that provides capabilities for dynamic routing, monitoring, resiliency, security, and more. Please view the wik

Netflix, Inc. 12.4k Jan 3, 2023
GMC-Tools - Plugin with basic tools for Minecraft server administrator

GMC-Tools - Plugin with basic tools for Minecraft server administrator. Currently we do not support configuration files and we do not recommend using this plugin on production servers.

GamesMC Studios 4 Jan 14, 2022
Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.

Stetho Stetho is a sophisticated debug bridge for Android applications. When enabled, developers have access to the Chrome Developer Tools feature nat

Meta 12.6k Jan 3, 2023
Time-Based One-Time Password (RFC 6238) and HMAC-Based One-Time Password (RFC 4226) reference implementations and more.

Crypto Time-Based One-Time Password (RFC 6238) and HMAC-Based One-Time Password (RFC 4226) reference implementations and more. Getting Started TOTP ge

Oliver Yasuna 1 May 12, 2022
Java binding to the Networking and Cryptography (NaCl) library with the awesomeness of libsodium

kalium - Java binding to the Networking and Cryptography (NaCl) library A Java binding to Networking and Cryptography library by Daniel J. Bernstein.

Bruno Oliveira da Silva 206 Oct 5, 2022
A networking framework that evolves with your application

ServiceTalk ServiceTalk is a JVM network application framework with APIs tailored to specific protocols (e.g. HTTP/1.x, HTTP/2.x, etc…) and supports m

Apple 805 Dec 30, 2022
A networking library for LibGDX utilizing Netty allowing easy creation of multiplayer games.

Lunar What is Lunar? Lunar is a networking library for LibGDX. With lunar you can easily create multiplayer games quickly and efficiently. Lunar provi

Vrekt 28 Nov 25, 2022
Commons networking related utils.

commons-networking Commons networking related utils. Note: This is not an official Cisco product. Features SSE (Server-sent Events) client GNMI Utils

Cisco Systems Engineers 6 Dec 22, 2022