说明:本文档简要描述了ltrace的命令,在文末有本命令的基本应用。
ltrace - A library call tracer
Trace library calls of a given program.
1。 -a, --align=COLUMN align return values in a secific column.
对齐具体某个列的返回值
2。 -c count time and calls, and report a summary on exit.
计算时间和调用,并在程序退出时打印摘要
3。 -C, --demangle decode low-level symbol names into user-level names.
解码低级别名称(内核级)为用户级名称
4。 -d, --debug print debugging info.
打印调试信息
5。 -e expr modify which events to trace.
改变跟踪的事件
6。 -f follow forks.
跟踪子进程
7。 -h, --help display this help and exit.
打印帮助信息
8。 -i print instruction pointer at time of library call.
打印指令指针,当库调用时
9。 -l, --library=FILE print library calls from this library only.
只打印某个库中的调用
10。 -L do NOT display library calls.
不打印库调用(注,不打印库调用信息,咱要你做什么呀)
11。 -n, --indent=NR indent output by NR spaces for each call level nesting.
对每个调用级别嵌套以NR个空格进行缩进输出
12。 -o, --output=FILE write the trace output to that file.
把输出定向到文件
13。 -p PID attach to the process with the process ID pid.
附着在值为PID的进程号上进行ltrace
14。 -r print relative timestamps.
打印相对时间戳
15。 -s STRLEN specify the maximum string size to print.
设置打印的字符串最大长度
16。 -S display system calls.
显示系统调用
17。 -t, -tt, -ttt print absolute timestamps.
打印绝对时间戳
18。 -T show the time spent inside each call.
输出每个调用过程的时间开销
19。 -u USERNAME run command with the userid, groupid of username.
使用某个用户ID或组ID来运行命令
20。 -V, --version output version information and exit.
打印版本信息,然后退出
21。 -x NAME treat the global NAME like a library subroutine.
----- 不好意思,这句话还真不知怎么翻译好 --------
#########################################################################################
下面是常见的几种应用场景