ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to Trace Unix System Calls for a Process

How to Trace Unix System Calls for a Process

原创 Linux操作系统 作者:myownstars 时间:2012-04-10 13:53:58 0 删除 编辑

The following platforms support a trace utility that can be used to identify what a process is doing:

O/S Version

Trace Utility

Oracle/Sun Solaris, Unixware 7.0

truss, e.g.:

$ truss -aefo
$ truss -rall -wall -p

HP/UX 11

tusc, e.g.:

$ tusc -afpo

(See: http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-8.0/)

IBM AIX 4.x

trace, e.g.:

Log on as root.
# trace -a -L 4000000 -T 2000000 -o ./trace.out;
# owsctl start admin
# trcstop
# trcrpt -O exec=on,pid=on trace.out > trcrpt.1

Or if present sctrace, e.g.:

$ sctrace -Amo
$ prpt -p

Note:
'sctrace' has been discontinued by Veritas Software
Corporation Inc. (formerly The Kernel Group Inc)
as off Jan. 8, 2002.

IBM AIX 5L

truss, e.g.:

$ truss -aefo

Linux

strace, ktrace/kdump, ltrace e.g.:

$ strace -fo

strace -f -ff -o -p

SGI IRIX 6.x

par, e.g.:

$ par -siSSo

HP Tru64 Unix

trace or truss, e.g.:

$ trace -fo
$ truss -aefo

Apple Mac OS X

ktrace/kdump, e.g.:

$ script. kdump.out
$ /usr/bin/ktrace -adi
$ /usr/bin/kdump
$ exit
$ more kdump.out

Sequent Dynix/PTX

truss, e.g.:

$ truss -aefo

Data General DG/UX R4.20MU06

dg_trace, e.g.:

$ dg_strace -fxto [] [-p ]

 

ID 110888.1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-720787/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-03-18

  • 博文量
    375
  • 访问量
    3094439