Hey, I am wondering how can I enable dtrace probes to ruby root at opensolaris:~# uname -a SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris root at opensolaris:~# ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-solaris2.11] root at opensolaris:~# I followed this: To install Ruby on OpenSolaris, please use the Image Packaging System, or IPS client. This will install the latest Ruby binaries and Rubygems directly from the OpenSolaris network repository. It?s easy: % pfexec pkg install SUNWruby18 This will install Ruby, Rubygems, common extensions and their supporting libraries. This package also contains DTrace support and performance optimizations. The locations of various artifacts are described in the Ruby OpenSolaris ARC Case. http://www.ruby-lang.org/en/downloads/ However: root at opensolaris:~# dtrace -l | grep -i ruby | wc -l 0 (just to confirm root at opensolaris:~# dtrace -l | grep -i postgres | wc -l 55 ) -- This message posted from opensolaris.org
On Tue, Sep 15, 2009 at 10:38 AM, l1x <leccine at gmail.com> wrote:> > However: > > root at opensolaris:~# dtrace -l | grep -i ruby | wc -l > 0 > > (just to confirm > root at opensolaris:~# dtrace -l | grep -i postgres | wc -l > 55 > )Because the ruby DTrace probes are USDT probes, they''re only going to show up if there''s an instance of Ruby running. But there might be a problem. I just installed this version of Ruby on an OpenSolaris box, and I see nothing: x2200# dtrace -ln ''ruby$target:::'' -c "ruby /tmp/hello.rb" ID PROVIDER MODULE FUNCTION NAME dtrace: failed to match ruby100999:::: No probe matches description hello x2200# This is the problem: x2200# file /usr/ruby/1.8/lib/libruby.so /usr/ruby/1.8/lib/libruby.so: ELF 32-bit LSB dynamic lib 80386 Version 1 [FPU], dynamically linked, stripped x2200# Because the installed version of this library is stripped, libdtrace(3LIB) can''t find the DTrace probes. Chad
Hi l1x, l1x wrote:> Hey, I am wondering how can I enable dtrace probes to ruby > > > > > However: > > root at opensolaris:~# dtrace -l | grep -i ruby | wc -l > 0 > > (just to confirm > root at opensolaris:~# dtrace -l | grep -i postgres | wc -l > 55 > ) >dtrace -l by itself will only show kernel probes. I doubt there are any probes in the operating system for ruby or postgres. You might try looking at http://ruby-dtrace.rubyforge.org/ for an example of using dtrace with ruby. (Or, do what I did... search the net for "ruby dtrace probes". max
I try it with with mongrel now. The final aim is to have some rails figures anyhow. thanks for the update! -- This message posted from opensolaris.org
Thank you, i am going to check that URL. -- This message posted from opensolaris.org
On Tue, Sep 15, 2009 at 4:42 PM, max at bruningsystems.com <max at bruningsystems.com> wrote:> You might try looking at > http://ruby-dtrace.rubyforge.org/ for an example of using dtrace with ruby.That''ll get you a library for creating USDT probes for your Ruby application (like Rails). If you want the core Ruby interpreter probes though, it won''t help. There''s actually been a GSoC project to create a standard set of probes in Rack using ruby-dtrace though, and to provide some visualisations. It''s got a page here: http://ecin.github.com/dtracy/ This should work for your Rails apps. Beware though, it currently only supports 32 bit builds of Ruby - I''m having a look at fixing that now that Apple have shipped a 64 bit build in Snow Leopard. Chris.
max at bruningsystems.com wrote:> Hi l1x, > > l1x wrote: >> Hey, I am wondering how can I enable dtrace probes to ruby >> >> >> >> >> However: >> >> root at opensolaris:~# dtrace -l | grep -i ruby | wc -l >> 0 >> >> (just to confirm root at opensolaris:~# dtrace -l | grep -i postgres | >> wc -l >> 55 >> ) >> > dtrace -l by itself will only show kernel probes. I doubt there are > any probes in > the operating system for ruby or postgres. You might try looking at > http://ruby-dtrace.rubyforge.org/ for an example of using dtrace with > ruby. > (Or, do what I did... search the net for "ruby dtrace probes".dtrace -l will actually show all currently registered probes including user land USDT probes. However an instance of an application with USDT probes has to be running in order to list it. For example:> milek at r600:~# pargs 1353 > 1353: /usr/bin/python2.4 /usr/lib/updatemanagernotifier > argv[0]: /usr/bin/python2.4 > argv[1]: /usr/lib/updatemanagernotifier > milek at r600:~# dtrace -l | grep python1353 > 530 python1353 libpython2.4.so.1.0 PyEval_EvalFrame > function-entry > 531 python1353 libpython2.4.so.1.0 dtrace_entry > function-entry > 532 python1353 libpython2.4.so.1.0 PyEval_EvalFrame > function-return > 533 python1353 libpython2.4.so.1.0 dtrace_return > function-return > milek at r600:~#
Robert Milkowski wrote:> max at bruningsystems.com wrote: >> Hi l1x, >> >> l1x wrote: >>> Hey, I am wondering how can I enable dtrace probes to ruby >>> >>> >>> >>> >>> However: >>> >>> root at opensolaris:~# dtrace -l | grep -i ruby | wc -l >>> 0 >>> >>> (just to confirm root at opensolaris:~# dtrace -l | grep -i postgres | >>> wc -l >>> 55 >>> ) >>> >> dtrace -l by itself will only show kernel probes. I doubt there are >> any probes in >> the operating system for ruby or postgres. You might try looking at >> http://ruby-dtrace.rubyforge.org/ for an example of using dtrace with >> ruby. >> (Or, do what I did... search the net for "ruby dtrace probes". > > dtrace -l will actually show all currently registered probes including > user land USDT probes. > However an instance of an application with USDT probes has to be > running in order to list it. >Thanks for the correction Robert. I realized that about 5 minutes after I sent my email, but wasn''t sure about terminology since I did not enable the user land probes, only listed them. And of course, the probes are handled in the kernel, so they have to be there. "Registered" works fine. max
> On Tue, Sep 15, 2009 at 10:38 AM, l1x > <leccine at gmail.com> wrote: > > But there might be a problem. I just installed this > version of Ruby > on an OpenSolaris box, and I see nothing: > > x2200# dtrace -ln ''ruby$target:::'' -c "ruby > /tmp/hello.rb" > ID PROVIDER MODULE > FUNCTION NAME > by100999:::: No probe matches description > hello > x2200# > > This is the problem: > > x2200# file /usr/ruby/1.8/lib/libruby.so > /usr/ruby/1.8/lib/libruby.so: ELF 32-bit LSB > dynamic lib 80386 > Version 1 [FPU], dynamically linked, stripped > x2200# > > Because the installed version of this library is > stripped, > libdtrace(3LIB) can''t find the DTrace probes. > > ChadI looked into this and found that the scenario described above occurs when the ''ruby'' executable is stripped. It''s something we can address when we push out the update to the SUNWruby18 package in the next couple of weeks. I raised a defect for it here: http://defect.opensolaris.org/bz/show_bug.cgi?id=11636 Thanks Amanda Waite -- This message posted from opensolaris.org