Any Linux user can trace an executable with strace.

What Isstrace?

strace is a Linux utility that lets you trace the system calls that a given app makes.

Four hard drivers sticking out of a rack-mount server that’s being used as a NAS.

It will also pick up on signals and produce a detailed output of all the information that it observes.

A person new to strace and tracing, in general, might ask why this is helpful.

There’s good news in both cases!

The main page of the Homepage homelab dashboard with services running on it.

Comparing this with GDB, which is also a wrapper process, things are substantially different.

With strace, it’s possible for you to simply execute the program understrace(i.e.

Especially in the areas of disk access,stracereally shines.

Terminal window showing the manual page for the Mutt email client on Linux

As it records all system calls, every disk access is very visible in the log.

Just this single line of output could lead to further research.

It’s easily analyzed and likely easily fixed thanks tostrace.

Article image

An exit code of 0 generally indicates successful execution and termination in Linux programs.

strace of a one second sleep process