bpf-perf-tools-book
bpf-perf-tools-book copied to clipboard
tcpconnect-tp.bt doesn't work in Ubuntu 18.04 w/ 4.19 kernel
ubuntu@ip-172-31-18-109:~$ sudo bpftrace tcpconnect-tp.bt
tcpconnect-tp.bt:30:38-69: ERROR: ntop() expects an integer or array argument, got ctx
printf("%-15s %-15s %-5d\n", ntop(args->family, args->saddr),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcpconnect-tp.bt:31:13-44: ERROR: ntop() expects an integer or array argument, got ctx
ntop(args->family, args->daddr), args->dport)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
environment
ubuntu@ip-172-31-18-109:~$ uname -sr
Linux 4.19.0-041900-generic
ubuntu@ip-172-31-18-109:~$ bpftrace --version
bpftrace v0.9.4-97-gef39
This should be fixed in master :). It still emits a warning we should fix but it can be silenced for now:
$ sudo bpftrace_master tcpconnect-tp.bt --no-warnings
Attaching 2 probes...
TIME PID COMM IP SADDR DADDR DPORT
12:54:28 10383 curl 4 10.0.2.15 216.58.208.110 80