Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Trace UNIX program execution in 10.2 UNIX
I have probably read nearly every bit of information on Jaguar, but it seems like nobody has mentioned this yet (it's a major thing to most UNIX people): The 10.2 kernel has the KTRACE option enabled!

This means that it is now possible to trace the flow of a program, for debugging purposes. By running a program like this:
 % ktrace /bin/ls
A file called "ktrace.out" will be generated, which contains information about all system calls the program has used. If any problem occurred, or if you're just curious what happened (e.g. which files were read, etc.), you can view the ktrace.out file using kdump:
 % kdump | less
This will present the dump in (semi-) human readable format. ;)

For more information, check out the ktrace man page.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[3,421 views]  

Trace UNIX program execution in 10.2 | 1 comments | Create New Account
Click here to return to the 'Trace UNIX program execution in 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
This is so cool!
Authored by: semios on Aug 27, '02 03:01:54PM

This is one of the few things that really soured me about OS X in relation to other unices. I'm so glad to have this functionality back. Thanks for revealing this hint.



[ Reply to This | # ]