3 ms·
I tried both, but the `-e open` option doesn't return anything $ strace uptime 2>&1 | grep open openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) =
by AdrienLemaire 7y ago
I tried both, but the `-e open` option doesn't return anything
$ strace uptime 2>&1 | grep open
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/uptime", O_RDONLY) = 3
...
$ strace -e open uptime
10:12:14 up 2 days, 18:52, 1 user, load average: 1.22, 1.30, 1.71
+++ exited with 0 +++
$
strace -- version 5.3
Optional features enabled: stack-trace=libunwind stack-demangle m32-mpers mx32-mpers
After digging in the documentation, I finally found something working:
$ strace -e trace=openat uptime
EDIT: got it. my system calls are openat, not open. Hence the following works
$ strace -e openat uptime