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 (runtime.runtimeName,runtime.containerId,runtime.containerName,runtime.containerPid,runtime.containerImageName,runtime.containerImageDigest,runtime.containerStartedAt,k8s.node,k8s.namespace,k8s.podName,k8s.labels,k8s.containerName,k8s.hostnetwork,k8s.owner.kind,k8s.owner.name,progid,type,name,runtime,runcount,cumulruntime,cumulruncount,totalruntime,totalRunCount,mapmemory,mapcount,totalcpu,percpu). (default -runtime,-runcount)
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