I am trying to debug a problem on a linux server.
When I run sudo ls /
the command takes several seconds to run. non-sudo ls /
runs as expected.
I suspect it has something to do with auditing going on via auditd
but I'm not certain.
Anyway, I then tried to run the command with strace: strace sudo ls /
, and the command runs just fine. In other words, it appears I'm in a heisenbug, where using strace to observe the behavior is in fact changing the behavior.
So while I am ultimately interested in figuring out why sudo ls /
takes so long, right now I'm really curious to learn how to use strace
to figure this out, and figure out if I'm using strace
wrong and how to use it correctly.