↧
Answer by Stephen Kitt for Filter out failed syscalls from strace log
Apart from post-processing the strace output, there isn’t anything available to ignore failed system calls in strace. It wouldn’t be too hard to add, look at the syscall_exiting_trace function in...
View ArticleAnswer by sourcejedi for Filter out failed syscalls from strace log
A slightly more reliable pattern (i.e. slightly less risk of skipping the wrong lines by accident) could be| grep -v "= -1 ENOENT [(]No such file or directory[)]$"I.e. copy-paste the end of line,...
View ArticleAnswer by Yurij Goncharuk for Filter out failed syscalls from strace log
Possible solution:strace -e trace=file sleep 1 2>&1 | grep -v "= -1 ENOENT"> strace.logstrace by default prints to stderr so redirect it to stdout.
View ArticleFilter out failed syscalls from strace log
I can run strace on a command like sleep 1and see what files it's accessing like this:strace -e trace=file -o strace.log sleep 1However, on my machine, many of the calls have a return value of...
View Article