跳过导航链接 | |
退出打印视图 | |
手册页第 1 部分:用户命令 Oracle Solaris 11 Information Library (简体中文) |
- 跟踪共享库过程调用
/usr/bin/sotruss [-f] [-F bindfromlist] [-T bindtolist] [-o outputfile] executable [executable arguments...]
sotruss 执行指定的命令并对其执行的库调用生成跟踪记录。每行跟踪输出会报告在执行每个过程调用时动态对象之间出现的绑定。sotruss 通过 Procedure Linkage Table 跟踪动态对象之间发生的所有过程调用,所以将只跟踪通过 Procedure Linkage Table 绑定的那些过程调用。有关更多信息, 《链接程序和库指南》
要跟踪的库的冒号分隔列表。仅会跟踪来自这些库的调用。缺省值为仅跟踪从主可执行对象发出的调用。
要跟踪的库的冒号分隔列表。仅会跟踪到这些库的调用。缺省设置是跟踪所有调用。
sotruss 输出会定向到 outputfile。如果该选项与 -f 选项结合,会将执行程序的 pid 放置在文件名的结尾。缺省情况下,sotruss 输出置于 stderr 中。
跟随 fork() 创建的所有子进程,并在每个子进程中打印 truss 输出。该选项还会导致在每个 truss 输出行中输出 pid。
示例 1 sotruss 示例。
以下是显示跟踪简单 ls 命令的简单示例:
% sotruss ls | more ls -> libc.so.1:*atexit(0xef7d7d1c, 0x23c00, 0x0) ls -> libc.so.1:*atexit(0x1392c, 0xef7d7d1c, 0xef621bb0) ls -> libc.so.1:*setlocale(0x6, 0x1396c, 0xef621ba8) ls -> libc.so.1:*textdomain(0x13970, 0x1396c, 0xef621ba8) ls -> libc.so.1:*time(0x0, 0xef61f6fc, 0xef621ba8) ls -> libc.so.1:*isatty(0x1, 0xef61f6fc, 0x0) ls -> libc.so.1:*getopt(0x1, 0xeffff8fc, 0x13980) ls -> libc.so.1:*malloc(0x100, 0x0, 0x0) ls -> libc.so.1:*malloc(0x9000, 0x0, 0x0) ls -> libc.so.1:*lstat64(0x23ee8, 0xeffff7a0, 0x0) ... ls -> libc.so.1:*printf(0x13a64, 0x26208, 0x23ef0) ls -> libc.so.1:*printf(0x13a64, 0x26448, 0x23ef0) ls -> libc.so.1:*exit(0x0, 0x24220, 0x2421c)
有关下列属性的描述,请参见 attributes(5):
|