| Author |
How to log C system calls
|
|
| rubylips 2004-04-28, 3:34 pm |
| I seem to remember that there is a Unix command that logs calls made to the
underlying C runtime libs ... except I can't remember the name of the
command. Any reminders would be appreciated.
rubylips
| |
| Måns Rullgård 2004-04-28, 3:34 pm |
| "rubylips" <rubylips@act365.com> writes:
> I seem to remember that there is a Unix command that logs calls made to the
> underlying C runtime libs ... except I can't remember the name of the
> command. Any reminders would be appreciated.
It varies depending on which Unix you're using. A common name is strace.
--
Måns Rullgård
mru@kth.se
| |
| Jem Berkes 2004-04-28, 3:34 pm |
| >> I seem to remember that there is a Unix command that logs calls made
>
> It varies depending on which Unix you're using. A common name is
> strace.
strace tells you the system calls (and signals), quite different from the C
library calls. System calls are those vital OS functions like fork(), write
() etc.
--
Jem Berkes
http://www.sysdesign.ca/
| |
| Måns Rullgård 2004-04-28, 4:34 pm |
| Jem Berkes <jb@users.pc9.org> writes:
>
> strace tells you the system calls (and signals), quite different from the C
> library calls. System calls are those vital OS functions like fork(), write
> () etc.
You are right. My apologies for not reading the post properly.
--
Måns Rullgård
mru@kth.se
| |
| Eric Sosman 2004-04-28, 4:34 pm |
| M=E5ns Rullg=E5rd wrote:
> =
> "rubylips" <rubylips@act365.com> writes:
> =
to the[vbcol=seagreen]
[vbcol=seagreen]
> =
> It varies depending on which Unix you're using. A common name is strac=
e.
On Solaris, "truss".
-- =
Eric.Sosman@sun.com
| |
| joe@invalid.address 2004-04-28, 5:34 pm |
| Jem Berkes <jb@users.pc9.org> writes:
>
> strace tells you the system calls (and signals), quite different
> from the C library calls. System calls are those vital OS functions
> like fork(), write () etc.
Well, maybe the OP needs to clarify what he's talking about. The
subject line is about system calls, but his text asks about library
calls.
For the OP, if you want to see library calls, run the program in a
debugger and set breakpoints appropriately.
joe
--
If people don't want to come out to the ballpark, nobody's going
to stop them.
- Yogi Berra
| |
| Dragan Cvetkovic 2004-04-28, 5:34 pm |
| Eric Sosman <Eric.Sosman@sun.com> writes:
> Måns Rullgård wrote:
>
> On Solaris, "truss".
I am sure there is a way to use dtrace for it :-)
Bye, Dragan
--
Dragan Cvetkovic,
To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer
!!! Sender/From address is bogus. Use reply-to one !!!
| |
| Rich Teer 2004-04-28, 5:34 pm |
| On Wed, 28 Apr 2004, Dragan Cvetkovic wrote:
> I am sure there is a way to use dtrace for it :-)
Probably - in much the same way as one COULD crack a walnut
with a sledgehammer. :-)
--
Rich Teer, SCNA, SCSA
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-online.net
| |
| Mohun Biswas 2004-04-28, 7:34 pm |
| Jem Berkes wrote:
> strace tells you the system calls (and signals), quite different from the C
> library calls. System calls are those vital OS functions like fork(), write
> () etc.
On Solaris the truss command can trace either system calls or libc
interface calls, or both. See the man page, look for the -u flag.
MB
|
|
|
|