_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

strace and ltrace — debugging

17. 08. 2025 1 min read intermediate

When logs don’t help, strace/ltrace are the safety net.

strace

strace ls /tmp
strace -p 1234
strace -e open,read,write ls /tmp
strace -c ls /tmp

Examples

strace -e openat ./app 2>&1 | grep error
strace -e write -p $(pgrep myapp)
strace -c -p $(pgrep myapp) # where it spends time

ltrace

ltrace ./my-program
ltrace -e malloc+free ./my-program
  • -f = child processes
  • -s 1000 = longer strings
  • Use briefly in production

Ultimate debugging

strace will save hours of troubleshooting.

straceltracedebugging
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.