AIX 4.3及以前版本居然没有可用的truss工具!
来源:互联网 发布:程序员能看懂的网名 编辑:程序博客网 时间:2024/05/20 19:18
AIX5.1开始提供truss工具,但是常见的Aix4.3及以前的版本都没有该工具,在网上找了找,找到如下信息:
Re: How to trace system level call in AIX
- To: Vuln-Dev <VULN-DEV@securityfocus.com>
- Subject: Re: How to trace system level call in AIX
- From: Michael Wojcik <Michael.Wojcik@microfocus.com>
- Date: Wed, 19 Dec 2001 07:27:49 -0800
- Delivered-to: rusfw@cert.uni-stuttgart.de
- Delivered-to: Weimer@CERT.Uni-Stuttgart.DE
- Delivered-to: explode-vuln-dev@mercury.rus.uni-stuttgart.de
- Delivered-to: mailing list vuln-dev@securityfocus.com
- Delivered-to: moderator for vuln-dev@securityfocus.com
- List-help: <mailto:vuln-dev-help@securityfocus.com>
- List-id: <vuln-dev.list-id.securityfocus.com>
- List-post: <mailto:vuln-dev@securityfocus.com>
- List-subscribe: <mailto:vuln-dev-subscribe@securityfocus.com>
- List-unsubscribe: <mailto:vuln-dev-unsubscribe@securityfocus.com>
- Mailing-list: contact vuln-dev-help@securityfocus.com; run by ezmlm
There's a third-party product for AIX 4 (and 3) which is similar to truss:sctrace, from SevOne Software. It's quite good, but you do have to pay forit.AIX's trace facility is actually quite powerful (you can do some interestingthings if you dig into its innards and rewrite the template file), but it'snot nearly as convenient for quick tracing of a single process astruss/ltrace/sctrace.Michael Wojcik 402 438-7842Software Systems Developer Micro Focus> -----Original Message-----> From: Valdis.Kletnieks@vt.edu [mailto:Valdis.Kletnieks@vt.edu]> Sent: Tuesday, December 18, 2001 4:13 PM> To: Minchu Mo> Cc: vuln-dev@securityfocus.com> Subject: Re: How to trace system level call in AIX > > > On Mon, 17 Dec 2001 20:36:12 GMT, Minchu Mo > <morris_minchu@iwon.com> said:> > Somthing like truss in solaris, ltrace in linux. Anybody> > know the command used to trace system call in AIX?> > AIX 5.1 has 'truss'.> > AIX 4.3.3 and earlier you can use the 'trace' command - but > it's a pain> because it's a system-level trace from which you can then extract the> information for the process you cared about.> > -- > Valdis Kletnieks> Operating Systems Analyst> Virginia Tech> > 然后又找到这个,但是运行出错
truss Command
Audience: Administrators
Date: June 22, 2001
The "truss" utility traces system calls. It's a popular System V tool that allows administrators to identify performance bottlenecks within applications.
The truss command is available in AIX starting in at version 5.1. The following shell script emulates the truss functionality in AIX 4.3.
#!/bin/ksh# Name: truss.sh# Purpose: to make AIX trace look like the truss command# Caveat: Unsupported tool. Use at your own risk.show_usage(){ echo "Usage: $0 [-P] [-n] [-p pid] [-t tempfile][-s sleeptime | command]" echo " -P show process id's in the output" echo " -n show process names in the output" echo " -p pid trcrpt only for this pid" echo " -s seconds trace forperiod of time" echo " -t tempfile path name to file that will be used for trace" echo " command execute this command and stop trace/c" echo " after command is done./n" exit 0}[ "$#" = 0 ] && show_usageset -- `getopt t:s:p:nP "$@"` || show_usagewhile :; do case $1 in -s) sleeptime=$2 shift 2;; -p) pid=$2 shift 2;; -n) EXEC="exec=on," shift;; -P) PIDNUM="pid=on," shift;; --) shift break;; esacdonecommand="$*"[ -n "$command" -a -n "$sleeptime" ] && show_usage[ -n "$pid" ] && PID="-p $pid" hooks="101,104,107,106,134,139,15B,130,19C,163,169,120,122,108,12E,14C,154,/152,15F,14E,137,135,13A,19B,13E,174,175,176,177,178,179,17A,17B,17D,17E,/17F,1A7,1A8,1A4,1A5,1A6,180,18F,195,18E,1A9,1AA,1AC,1AB,1F0,1AF,1AE,1AD"do_trace(){logsize=$1;bufsize=$2;trace -n -a -L $logsize -T $bufsize -j $hooks -do trace.out || return $?}do_trace 8000000 4000000 || { echo "You do not have privilege as this uid to allocate a large trace buffer" echo "Trying with a smaller buffer, but you may lose data" do_trace 8000000 1000000 || { echo "You do not have privilege as this uid to allocate a large trace buffer" trcstop exit 1 }}trconif [ -n "$sleeptime" ]; then sleep $sleeptimeelse $command # run the commandfi# do whatever you want heretrcstoptrcrpt -k 106 ${PID} -h -O ${EXEC}${PIDNUM}ids=0,timestamp=3 trace.out # > trcrpt.out
- AIX 4.3及以前版本居然没有可用的truss工具!
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- Fedora 17及以前的版本关闭防火墙
- 以前没有注意到的地方
- 一个小小的distinct关键字,以前居然一直没理解
- 妈蛋,怎么发现百度空间以前写的东西居然连个分类都没有了,只好转到CSDN存点学习材料了
- linphone-解决3.2.5版本在Android5.0以前的系统没有H264编码的问题
- Dynamics CRM2015 2015版本可用的OData Query Designer工具
- 关于aix版本的问题
- PHP 5.3.6及以前版本的PDO的bindParam,bindValue潜在的安全隐患
- PHP 5.3.6及以前版本的PDO的bindParam,bindValue潜在的安全隐患
- 以前没有注意到的一个题目
- 靠,以前没有写博客的习惯。。
- aix 压缩软件及工具库 下载地址
- android5及以前的版本user和userdebug模式下remount修改/system读写权限
- 昔日突厥今何在
- 2004-11-19 计划提前,搬家行动开始~~
- 利用浏览器实现程序界面与实现的分离
- 国内OA软件面临新的挑战
- 记录log日志文件的工具类
- AIX 4.3及以前版本居然没有可用的truss工具!
- junit的开发(eclipse插件开发系列)
- 正则表达式经典
- 我现在正在配置我的blog,谁有日历呀给我发一下
- 数据库语句的优化...
- 写在毕业的一年零五个月
- 进入游戏设计开发之路... ...
- 我的常用工具包
- 初评hibernate