Tool for exhaustive API trace with runtime values for any pr

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
jasonneverland
Posts: 1
Joined: Mon Jan 21, 2008 12:30 pm

Tool for exhaustive API trace with runtime values for any pr

Post by jasonneverland »

Hi,
I am looking for a tool (command line linux / solaris) which can return a list of api calls at the kernel level (or C/C++ equivalent) for a given program and all its child processes. It should work with scripts (shell, perl, etc...), binaries, code being compiled etc. The basic idea is to profile the program runtime execution in a fine grained manner and figure out the values its reading/writing, files its reading and writing, libraries its accessing etc. to have an exhaustive description of its run.
Thanks,
Jason
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

[quote="The Man Pages for Strace"]NAME
strace - trace system calls and signals

SYNOPSIS
strace [ -dffhiqrtttTvxx ] [ -acolumn ] [ -eexpr ] ... [ -ofile ] [
-ppid ] ... [ -sstrsize ] [ -uusername ] [ -Evar=val ] ... [ -Evar ]
... [ command [ arg ... ] ]

strace -c [ -eexpr ] ... [ -Ooverhead ] [ -Ssortby ] [ command [ arg
... ] ]

DESCRIPTION
In the simplest case strace runs the specified command until it exits.
It intercepts and records the system calls which are called by a proâ€
djenkins75
Posts: 11
Joined: Sun Dec 16, 2007 11:32 am
Location: Wisconsin, USA

Post by djenkins75 »

In solaris, "truss" does mostly the same thing.

FreeBSD uses "ktrace", but the semantics are a bit different.
Post Reply