6

我执行了命令: strace -ttt /bin/cat 在 Ubuntu 11.04 上获取系统调用。然而 strace 挂在命令“read”上,无法完成。
我必须按 ctrl+c 才能停止它。
输出类似于:

...
1365073129.724883 close(3)              = 0
1365073129.724928 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
1365073129.724963 fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
1365073129.725003 read(0,

因为我需要对大量的可执行文件做同样的事情,所以我无法承受这样的频繁挂起。有没有办法解决这个问题,例如,如果超时,让 strace 停止,或者让 strace 退出跳过挂起的系统调用。

4

0 回答 0