Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ltrace equivalent for osx?

Tags:

osx has the really powerful dtrace/ktrace/dtruss tools - however i'm not willing to invest the time necessary to learn dealing with them right now.

what's the easiest way to get the equivalent functionality of linux ltrace (and possibly strace) on OSX?

like image 283
Enki Avatar asked Aug 11 '09 04:08

Enki


2 Answers

No answer for ltrace (except perhaps "work out how to use dtrace" :-) ), but for system call tracing ala strace, dtruss is a pretty good front end to dtrace.

e.g.

dtruss df -h     # run and examine the "df -h" command

dtruss -p 1871   # examine PID 1871

dtruss -n tar    # examine all processes called "tar"
like image 97
Dean Povey Avatar answered Oct 02 '22 23:10

Dean Povey


you don't need to learn dtrace to use it. there are quite a few dtrace scripts that come with OSX. To see an (incomplete) list:

man -k dtrace

In your case dapptrace might do the job.

like image 9
Vitaly Kushner Avatar answered Sep 28 '22 23:09

Vitaly Kushner