Well what's hot nowadays in Linux is bpftrace which is built on top of
eBPF.
You probably can just 'apt install bpftrace' on your ubuntu18.04 which
*may* be a bit outdated.
Afterwards you can check out existing scripts, for example on my ubt 20.04:
sean@ubuntu:/usr/sbin$ ls *bt
bashreadline.bt  capable.bt         killsnoop.bt  opensnoop.bt  statsnoop.bt
tcpconnect.bt  threadsnoop.bt
biolatency.bt    cpuwalk.bt         loads.bt      pidpersec.bt  swapin.bt
   tcpdrop.bt     vfscount.bt
biosnoop.bt      dcsnoop.bt         mdflush.bt    runqlat.bt    syncsnoop.bt
tcplife.bt     vfsstat.bt
biostacks.bt     execsnoop.bt       naptime.bt    runqlen.bt    syscount.bt
 tcpretrans.bt  writeback.bt
bitesize.bt      gethostlatency.bt  oomkill.bt    setuids.bt    tcpaccept.bt
tcpsynbl.bt    xfsdist.bt

There are some resemblance between bpftrace and dtrace scripts so you might
be able to adapt what you need to bpftrace.

Good luck,

Sean

On Mon, Oct 3, 2022 at 4:02 PM ch-and-dtrace.topicbox.com via
dtrace-discuss <dtrace-discuss@lists.dtrace.org> wrote:

> Ok, I found perf (https://www.brendangregg.com/perf.html), and if I knew
> what I was doing, I think I'd be able to write a one-liner that did what I
> want.  That's a big caveat, though.
> *DTrace <https://dtrace.topicbox.com/latest>* / dtrace-discuss / see
> discussions <https://dtrace.topicbox.com/groups/dtrace-discuss> +
> participants <https://dtrace.topicbox.com/groups/dtrace-discuss/members>
> + delivery options
> <https://dtrace.topicbox.com/groups/dtrace-discuss/subscription> Permalink
> <https://dtrace.topicbox.com/groups/dtrace-discuss/T345746b17158d294-M4ea6ca4c8a542ceb7d276016>
>

------------------------------------------
DTrace: dtrace-discuss
Permalink: 
https://dtrace.topicbox.com/groups/dtrace-discuss/T345746b17158d294-M65b7cbd385c36865661d3efd
Delivery options: https://dtrace.topicbox.com/groups/dtrace-discuss/subscription

Reply via email to