Page 1 of 1

Tool for exhaustive API trace with runtime values for any pr

Posted: Mon Jan 21, 2008 12:33 pm
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

Posted: Mon Jan 21, 2008 1:55 pm
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â€

Posted: Mon Jan 21, 2008 6:25 pm
by djenkins75
In solaris, "truss" does mostly the same thing.

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