With Adam''s help, I have succeeded in replacing the Sun Grid Engine debug output subsystem with USDT probes. This allows us to cheaply turn on debugging output while a daemon is running (on Nevada, of course). The probe list and provider is attached. Each probe corresponds to a Grid Engine debugging macro. I have replaced the contents of the macros with static probes. The DTrace output is driven by the $SGE_DEBUG_LEVEL variable, i.e. dl.d <pid> $SGE_DEBUG_LEVEL. For an explanation of how debug output in Grid Engine works, see: http://blogs.sun.com/templedf/entry/using_debugging_output I''m still having an issue with the -Z option in my script. If I have "#! /usr/sbin/dtrace -Z -s" as the first line of my script, none of my probes get activated. If I leave out the -Z option, I have to remove the probes that aren''t present in every daemon to get the script to run. Suggestions? Thanks, Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: dl.d Type: text/x-dsrc Size: 2796 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070817/76d0c3d6/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: debug.d Type: text/x-dsrc Size: 271 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070817/76d0c3d6/attachment-0001.bin>
On Fri, Aug 17, 2007 at 02:34:16PM -0700, Daniel Templeton wrote:> I''m still having an issue with the -Z option in my script. If I have > "#! /usr/sbin/dtrace -Z -s" as the first line of my script, none of my > probes get activated. If I leave out the -Z option, I have to remove > the probes that aren''t present in every daemon to get the script to > run. Suggestions?The #! syntax allows for no more than one argument to be passed to the interpreter. In this case, -s is being silently omitted. This isn''t a deficiency in DTrace or Solaris -- it''s an historical issue that comes up from time to time in this context in particular. You can get around the issue by doing this: #!/usr/sbin/dtrace -Zs - ahl -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Duh! Thanks... Daniel Adam Leventhal wrote:> On Fri, Aug 17, 2007 at 02:34:16PM -0700, Daniel Templeton wrote: > >> I''m still having an issue with the -Z option in my script. If I have >> "#! /usr/sbin/dtrace -Z -s" as the first line of my script, none of my >> probes get activated. If I leave out the -Z option, I have to remove >> the probes that aren''t present in every daemon to get the script to >> run. Suggestions? >> > > The #! syntax allows for no more than one argument to be passed to the > interpreter. In this case, -s is being silently omitted. This isn''t a > deficiency in DTrace or Solaris -- it''s an historical issue that comes > up from time to time in this context in particular. You can get around > the issue by doing this: > > #!/usr/sbin/dtrace -Zs > > - ahl > >