【翻译自mos文章】跟踪UNIX系统调用的方法

295 篇文章 0 订阅
86 篇文章 9 订阅

来源于:

How to Trace Unix System Calls (文档 ID 110888.1)


APPLIES TO:

Oracle Database - Enterprise Edition - Version 7.0.16.0 and later
Generic UNIX
Checked for relevance on 08-FEB-2013

PURPOSE

To identify the Unix command necessary to trace Unix system calls for a process.

SCOPE

This article is intended for use by any Unix user who needs to provide Oracle Support with O/S level trace information from a process.  The commands listed here may be not generally available within the operating system, and so you should consult your hardware/Operating System supplier to purchase/license use of these tools if they are not available.

DETAILS

How to Trace Unix System Calls for a Process

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 <output file> <executable> 
$ truss -rall -wall -p <PID>
HP/UX 11

tusc, e.g.: 

$ tusc -afpo <output file> <pid> <executable> 

(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 <output file> <executable>
$ prpt -p <trace file> <executable>

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 <output file> <executable>
Linux strace, ktrace/kdump, ltrace e.g.:

$ strace -fo <output file> <executable>
SGI IRIX 6.x par, e.g.:

$ par -siSSo <output file> <executable>
HP Tru64 Unix trace or truss, e.g.:

$ trace -fo <output file> <executable>
$ truss -aefo <output file> <executable>
Apple Mac OS X ktrace/kdump, e.g.:

$ script kdump.out
$ /usr/bin/ktrace -adi <command>
$ /usr/bin/kdump
$ exit
$ more kdump.out
Sequent Dynix/PTX truss, e.g.:

$ truss -aefo <output file> <executable>
Data General DG/UX R4.20MU06 dg_trace, e.g.:

$ dg_strace -fxto <output> [<executable>] [-p <pid>]

 

 

REFERENCES

NOTE:1812.1  - TECH: Getting a Stack Trace from a CORE file on Unix

NOTE:314533.1  - Installing TUSC for HP-UX 11.00, 11.11,11.23,11.31(PA-RISC and Itanium) on the fly as a non-root user
NOTE:28588.1  - TECH: Using Truss / Trace on Unix
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值