13

When I asked for tools to profile Rails apps, someone pointed at DTrace. Since I work on MacOSX stations and deploy on OpenSolaris, it is a valid way to go. But I have little knowledge of DTrace.

Besides the usual suspect, Sun DTrace page and the avaliable info there, is there any other killer pointer to learn Dtrace out there?

Community
  • 1
  • 1
lsdr
  • 1,245
  • 1
  • 15
  • 28

6 Answers6

12

I did a 35 min video and showed some DTrace starter examples that you can find here: http://cocoasamurai.blogspot.com/2008/05/dtrace-for-cocoa-developers.html which were intended for introducing DTrace to Cocoa Developers, but it can work for anybody really

Colin Wheeler
  • 3,343
  • 2
  • 21
  • 23
7
alanc
  • 4,102
  • 21
  • 24
philant
  • 34,748
  • 11
  • 69
  • 112
6

Watch the Brian Cantrill DTrace video. This is a great demo-based talk and Cantrill is one of the DTrace creators.

http://video.google.com/videoplay?docid=-8002801113289007228

elasticrat
  • 7,060
  • 5
  • 36
  • 36
  • The link wasn't working, but I looked for the video and I think I found it on youtube: https://www.youtube.com/watch?v=TgmA48fILq8 – Aaron Storck Jun 11 '14 at 03:24
4

I found that reading dtrace version of the usual admin monitoring tools of Mac OS X was a great help truss -> dtruss. There are at least a dozen different scripts that you can read. (Most begining by "d".)

There also is /Developer/Applications/Instruments.app which is a graphical app which generates dtrace scripts.

Also, Wikipedia's DTrace page has loads of links which should help.

mat
  • 12,943
  • 5
  • 39
  • 44
4

This is probably way too late to be useful, but Adam Leventhal's DTrace boot camp presentation is great for getting started:

http://blogs.oracle.com/roller/resources/ahl/dtrace_course.2005.8.18.pdf

alanc
  • 4,102
  • 21
  • 24
Dave Pacheco
  • 850
  • 6
  • 14
2

You can also try the "dtrace toolkit" it has scripts for lots of monitoring purposes to give you a kick start.

Also you can attach X-Code's "Instruments" to any process. After this gives you a general idea of your app you can give a try to write your own scripts

Robert Gould
  • 68,773
  • 61
  • 187
  • 272