This might be a n00b question, but is there an example that demonstrates how one can collect DTrace output programmatically? For example, if I were interested in building a web interface for dtrace, how should I go about it? Thanks in advance, Kedar -- This message posted from opensolaris.org
Hi Kedar, Are you familiar with Chime? http://opensolaris.org/os/project/dtrace-chime/ Chip> -----Original Message----- > From: dtrace-discuss-bounces at opensolaris.org [mailto:dtrace-discuss- > bounces at opensolaris.org] On Behalf Of Kedar Mhaswade > Sent: Friday, January 16, 2009 12:02 PM > To: dtrace-discuss at opensolaris.org > Subject: [dtrace-discuss] Programmatic interface to DTrace? > > This might be a n00b question, but is there an example that > demonstrates how one can collect DTrace output programmatically? > > For example, if I were interested in building a web interface for > dtrace, how should I go about it? > > Thanks in advance, > Kedar > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
For a java API you might look at: http://opensolaris.org/os/project/dtrace-chime/java_dtrace_api/ and for the C API (libdtrace): http://dev.lrem.net/tcldtrace/wiki/LibDtrace http://www.osdevcon.org/2008/files/osdevcon2008-petr.pdf Chip> -----Original Message----- > From: dtrace-discuss-bounces at opensolaris.org [mailto:dtrace-discuss- > bounces at opensolaris.org] On Behalf Of Kedar Mhaswade > Sent: Friday, January 16, 2009 12:02 PM > To: dtrace-discuss at opensolaris.org > Subject: [dtrace-discuss] Programmatic interface to DTrace? > > This might be a n00b question, but is there an example that > demonstrates how one can collect DTrace output programmatically? > > For example, if I were interested in building a web interface for > dtrace, how should I go about it? > > Thanks in advance, > Kedar > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
On Fri, Jan 16, 2009 at 02:03:48PM -0500, Chip Bennett wrote:> and for the C API (libdtrace): > > http://dev.lrem.net/tcldtrace/wiki/LibDtraceOh, and there''s a tantalizing link to a Tcl interface, not yet populated, and an even more tantalizing link to what a TclDTrace script would look like!
Very nice. Thank you! This is what I was looking for. Regards, Kedar -- This message posted from opensolaris.org
On Fri, Jan 16, 2009 at 6:01 PM, Kedar Mhaswade <kedar.mhaswade at sun.com> wrote:> This might be a n00b question, but is there an example that demonstrates how one can collect DTrace output programmatically? > > For example, if I were interested in building a web interface for dtrace, how should I go about it?I''ve released a Ruby interface to DTrace, which you can use from a Rails app, for instance. The interface covers both consuming DTrace data and creating DTrace probes programmatically. The interface docs are here: http://ruby-dtrace.rubyforge.org/ and the source lives on github, where you''ll find an example of integrating with Rails: http://github.com/chrisa/ruby-dtrace/tree/master Hope that helps. Chris.