strace:Linux/类 Unix 系统上的命令行调试工具,用来“跟踪(trace)”一个进程执行时发起的系统调用与接收的信号,常用于排查程序卡住、权限/文件路径错误、网络连接失败等问题。(也常写作工具名 strace。)
/ˈɛs.treɪs/
I used strace to see which file the program was trying to open.
我用 strace 查看程序到底想打开哪个文件。
By running strace with output redirected to a log, the team discovered the service was repeatedly failing on a permission-denied system call during startup.
通过运行 strace 并把输出重定向到日志,团队发现服务在启动时反复因一次“权限被拒绝”的系统调用而失败。
strace 通常被理解为 “system trace(系统跟踪)” 的缩写:用“追踪”的方式记录程序与操作系统内核交互的细节(系统调用、信号等),从而帮助定位问题。