Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
Understanding `strace`, `ltrace`, and `ftrace`: Tracing system calls, dynamic library calls, and kernel events.
senior Levellinux-osAdvanced Internals
In Simple Words:
strace -p <PID> -e trace=network,file -tt -T: Intercepts and records system calls made between user-space processes and the Linux kernel, printing argument values, return codes, and elapsed execution time. Essential for diagnosing hung processes ("why is this app stuck?").ltrace: Intercepts dynamic library calls (e.g. calls tolibc.so,libssl.so).ftrace: Internal Linux kernel tracer that tracks function calls inside the kernel itself, measuring interrupt latencies and scheduling delays.