Re:Why would you still want to use strace in 2023? [video]
by c0l0 on Monday January 08, 2024 @06:25AM
(#38910571)
FTR, on modern-ish glibc-powered systems (in code that actually does use libc, and does not do its very own syscall-related thing instead), you will not find a single call to open(2) issued, in my experience. That's because the library functions shadowing these syscalls were rewired to use openat(2) under the hood.
[ Parent
| on HN ]
Re:Why would you still want to use strace in 2023? [video]
by lelanthran on Monday January 08, 2024 @09:27AM
(#38912338)
If you want to catch both `open` and `openat`, the opensnoop BPF[1] program is pretty nifty, especially if you are trying to figure out file stuff across several different programs ("which #$%^-ing program keeps modifying this file", for example).
[1] I've been dipping my toes into BPF recently, and while complicated (best to simply clone the bpftools repo and work off of that) there's a lot that can be done that tools like strace won't be able to match.