Gadget ebpftop

    ebpftop shows cpu time used by ebpf programs.

    The following parameters are supported:

    • interval: Output interval, in seconds. (default 1)
    • max_rows: Maximum rows to print. (default 20)
    • sort_by: The field to sort the results by (all,runtime,runcount,progid,totalruntime,totalruncount,cumulruntime,cumulruncount,mapmemory,mapcount). (default all)

    Example CR

    apiVersion: gadget.kinvolk.io/v1alpha1
    kind: Trace
    metadata:
      name: ebpftop
      namespace: gadget
    spec:
      node: ubuntu-hirsute
      gadget: ebpftop
      runMode: Manual
      outputMode: Stream
      parameters:
        interval: "1"
        max_rows: "50"
        sort_by: all # all, runtime, runcount, progid, totalruntime, totalruncount, cumulruntime, cumulrouncount, mapmemory and mapcount are allowed
    

    Operations

    start

    Start ebpftop gadget

    $ kubectl annotate -n gadget trace/ebpftop \
        gadget.kinvolk.io/operation=start
    

    stop

    Stop ebpftop gadget

    $ kubectl annotate -n gadget trace/ebpftop \
        gadget.kinvolk.io/operation=stop
    

    Output Modes

    • Stream