Is there a trick to listing available providers? I can''t find it.
G''Day Dan, On Thu, 20 Apr 2006, Dan Mick wrote:> Is there a trick to listing available providers? I can''t find it.Not that I know of. I run "dtrace -l" through a simple frequency counter (which also tells me how many probes are in each provider), # dtrace -l | freqcount -f2 42244:fbt 17924:pid581 485:mib 462:syscall 188:sdt 59:sysinfo 52:sched 44:vminfo 33:profile 22:lockstat 15:proc 12:io 3:dtrace 1:PROVIDER 1:fasttrap freqcount is at http://www.brendangregg.com/Perl/freqcount . The DTrace Guide (on docs.sun.com) is also a good reference (lists providers by chapter), as has the probe documentation as well. no worries, Brendan [Sydney, Australia]
>>Is there a trick to listing available providers? I can''t find it. > > Not that I know of. I run "dtrace -l" through a simple frequency counter > (which also tells me how many probes are in each provider), > > # dtrace -l | freqcount -f2Well, *sure*, if you want to *cheat*. :)> The DTrace Guide (on docs.sun.com) is also a good reference (lists > providers by chapter), as has the probe documentation as well.yeah, I''m pretty aware of the DTrace Guide, thanks...
> Is there a trick to listing available providers? I can''t find it.You could always do it with mdb...> 1::id2probe | ::print dtrace_probe_t dtpr_provider | ::listdtrace_provider_t dtpv_next | ::print dtrace_provider_t dtpv_name dtpv_name = 0xffffffff8ac62e40 "dtrace" dtpv_name = 0xffffffff97e390e8 "pid487" dtpv_name = 0xffffffff8c421000 "nfsmapid716" dtpv_name = 0xffffffff8c46ff28 "fasttrap" dtpv_name = 0xffffffff8c384f08 "sdt" dtpv_name = 0xffffffff8c384f28 "fsinfo" dtpv_name = 0xffffffff8c384f20 "mib" dtpv_name = 0xffffffff8cf8a578 "io" dtpv_name = 0xffffffff8c384f38 "proc" dtpv_name = 0xffffffff8c817690 "sched" dtpv_name = 0xffffffff8d3b6d08 "fpuinfo" dtpv_name = 0xffffffff8ae385d8 "vminfo" dtpv_name = 0xffffffff8c817640 "sysinfo" dtpv_name = 0xffffffff8c384ed8 "vtrace" dtpv_name = 0xffffffff8ae386e0 "fbt" dtpv_name = 0xffffffff8ae38088 "syscall" dtpv_name = 0xffffffff8ca50ce0 "profile" dtpv_name = 0xffffffff8c421110 "lockstat" Cheers. Jon.
Awk schmawk! Shell, with only one pipe! # dtrace -l | while read Z PRO Z; do [[ ${PROVS#* ${PRO} *} == ${PROVS} ]] && PROVS=" $PROVS $PRO " ; done ; echo $PROVS PROVIDER dtrace nfsmapid721 fasttrap proc sysinfo sched vminfo sdt io mib fbt syscall profile lockstat :)) Nathan. On Fri, 2006-04-21 at 13:26, John Dewey wrote:> On Fri, Apr 21, 2006 at 12:38:16PM +1000, Brendan Gregg wrote: > > G''Day Dan, > > > > On Thu, 20 Apr 2006, Dan Mick wrote: > > > > > Is there a trick to listing available providers? I can''t find it. > > > > Not that I know of. I run "dtrace -l" through a simple frequency counter > > (which also tells me how many probes are in each provider), > > > > perl - smerl'' :P > > dtrace -l | awk ''{print $2}'' | sort | uniq -c | sort > > > # dtrace -l | freqcount -f2 > > 42244:fbt > > 17924:pid581 > > 485:mib > > 462:syscall > > 188:sdt > > 59:sysinfo > > 52:sched > > 44:vminfo > > 33:profile > > 22:lockstat > > 15:proc > > 12:io > > 3:dtrace > > 1:PROVIDER > > 1:fasttrap > > > > freqcount is at http://www.brendangregg.com/Perl/freqcount . > > > > The DTrace Guide (on docs.sun.com) is also a good reference (lists > > providers by chapter), as has the probe documentation as well. > > > > no worries, > > > > Brendan > > > > [Sydney, Australia] > > > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss at opensolaris.org > > > "Quickly, bring me a beaker of wine. So that I may wet my brain > and say something clever." -- Aristophanes > _______________________________________________ > dtrace-discuss mailing listdtrace-discuss at opensolaris.org -- ////////////////////////////////////////////////////////////////// // Nathan Kroenert nathan.kroenert at sun.com // // PTS Engineer Phone: +61 2 9844-5235 // // Sun Services Direct Ext: x57235 // // Level 2, 828 Pacific Hwy Fax: +61 2 9844-5311 // // Gordon 2072 New South Wales Australia // //////////////////////////////////////////////////////////////////
G''Day Nathan, On Fri, 21 Apr 2006, Nathan Kroenert wrote:> Awk schmawk! > > Shell, with only one pipe! > > # dtrace -l | while read Z PRO Z; do [[ ${PROVS#* ${PRO} *} => ${PROVS} ]] && PROVS=" $PROVS $PRO " ; done ; echo $PROVS > PROVIDER dtrace nfsmapid721 fasttrap proc sysinfo sched vminfo sdt io > mib fbt syscall profile lockstat > > :))Shell, schmell. Yes, it''s nice to avoid a fork/exec, but nothing beats INTERCAL for strict simplicity, DO .11 <- #0 PLEASE ABSTAIN FROM FORGETTING DO ,1 <- #43 PLEASE DO ,1SUB#1 <- #26 DO ,1SUB#2 <- #56 DO ,1SUB#3 <- #8 DO ,1SUB#4 <- #216 DO ,1SUB#5 <- #0 DO ,1SUB#6 <- #90 DO ,1SUB#7 <- #222 PLEASE DO ,1SUB#8 <- #146 DO ,1SUB#9 <- #80 PLEASE DO ,1SUB#10 <- #176 DO ,1SUB#11 <- #34 DO ,1SUB#12 <- #52 DO ,1SUB#13 <- #8 DO ,1SUB#14 <- #216 DO ,1SUB#15 <- #0 PLEASE DO ,1SUB#16 <- #202 DO ,1SUB#17 <- #126 PLEASE DO ,1SUB#18 <- #130 DO ,1SUB#19 <- #142 DO ,1SUB#20 <- #200 DO ,1SUB#21 <- #248 DO ,1SUB#22 <- #112 DO ,1SUB#23 <- #160 DO ,1SUB#24 <- #88 PLEASE DO ,1SUB#25 <- #74 DO ,1SUB#26 <- #190 DO ,1SUB#27 <- #160 DO ,1SUB#28 <- #120 DO ,1SUB#29 <- #64 DO ,1SUB#30 <- #72 DO ,1SUB#31 <- #0 DO ,1SUB#32 <- #48 PLEASE DO ,1SUB#33 <- #114 DO ,1SUB#34 <- #120 PLEASE DO ,1SUB#35 <- #136 DO ,1SUB#36 <- #126 DO ,1SUB#37 <- #16 DO ,1SUB#38 <- #80 PLEASE DO ,1SUB#39 <- #34 DO ,1SUB#40 <- #120 DO ,1SUB#41 <- #128 DO ,1SUB#42 <- #0 DO ,1SUB#43 <- #188 PLEASE READ OUT ,1 DO ,1 <- #1 PLEASE DO ,1SUB#1 <- #0 PLEASE READ OUT ,1 PLEASE ABSTAIN FROM STASHING DO ,2 <- #10 PLEASE DO ,2SUB#1 <- #62 DO ,2SUB#2 <- #124 DO ,2SUB#3 <- #176 DO ,2SUB#4 <- #208 DO ,2SUB#5 <- #112 DO ,2SUB#6 <- #88 DO ,2SUB#7 <- #218 DO ,2SUB#8 <- #0 DO ,2SUB#9 <- #0 DO ,2SUB#10 <- #36 PLEASE ABSTAIN FROM IGNORING DO ,3 <- #9 PLEASE DO ,3SUB#1 <- #30 DO ,3SUB#2 <- #60 DO ,3SUB#3 <- #8 DO ,3SUB#4 <- #72 DO ,3SUB#5 <- #88 DO ,3SUB#6 <- #218 DO ,3SUB#7 <- #0 DO ,3SUB#8 <- #0 DO ,3SUB#9 <- #36 PLEASE REINSTATE FORGETTING DO ,4 <- #13 PLEASE DO ,4SUB#1 <- #110 DO ,4SUB#2 <- #52 DO ,4SUB#3 <- #8 DO ,4SUB#4 <- #216 DO ,4SUB#5 <- #0 PLEASE DO ,4SUB#6 <- #202 DO ,4SUB#7 <- #142 DO ,4SUB#8 <- #200 DO ,4SUB#9 <- #248 DO ,4SUB#10 <- #112 DO ,4SUB#11 <- #160 DO ,4SUB#12 <- #88 DO ,4SUB#13 <- #26 PLEASE REINSTATE FORGETTING DO ,5 <- #13 PLEASE DO ,5SUB#1 <- #146 DO ,5SUB#2 <- #44 DO ,5SUB#3 <- #72 DO ,5SUB#4 <- #136 DO ,5SUB#5 <- #88 PLEASE DO ,5SUB#6 <- #74 DO ,5SUB#7 <- #30 DO ,5SUB#8 <- #56 DO ,5SUB#9 <- #8 DO ,5SUB#10 <- #216 DO ,5SUB#11 <- #0 DO ,5SUB#12 <- #154 DO ,5SUB#13 <- #228 PLEASE REINSTATE STASHING DO ,6 <- #19 PLEASE DO ,6SUB#1 <- #142 DO ,6SUB#2 <- #204 DO ,6SUB#3 <- #168 DO ,6SUB#4 <- #0 DO ,6SUB#5 <- #168 DO ,6SUB#6 <- #224 DO ,6SUB#7 <- #152 DO ,6SUB#8 <- #170 PLEASE DO ,6SUB#9 <- #128 DO ,6SUB#10 <- #214 DO ,6SUB#11 <- #24 DO ,6SUB#12 <- #144 DO ,6SUB#13 <- #88 PLEASE DO ,6SUB#14 <- #42 DO ,6SUB#15 <- #214 DO ,6SUB#16 <- #56 DO ,6SUB#17 <- #0 DO ,6SUB#18 <- #32 DO ,6SUB#19 <- #162 PLEASE REINSTATE IGNORING DO ,7 <- #9 PLEASE DO ,7SUB#1 <- #78 DO ,7SUB#2 <- #56 DO ,7SUB#3 <- #8 DO ,7SUB#4 <- #216 DO ,7SUB#5 <- #0 DO ,7SUB#6 <- #40 DO ,7SUB#7 <- #216 DO ,7SUB#8 <- #90 DO ,7SUB#9 <- #36 DO (1900) NEXT DO .2 <- #662 DO (1040) NEXT DO .1 <- .3 DO (1020) NEXT DO .12 <- .1 (210) DO FORGET #1 DO .1 <- .11 DO (1020) NEXT DO .11 <- .1 DO READ OUT ,4 DO READ OUT .11 DO READ OUT ,5 PLEASE WRITE IN .13 DO READ OUT ,1 DO .1 <- .13 DO .2 <- .12 PLEASE DO (2000) NEXT DO (230) NEXT DO (242) NEXT (230) DO (240) NEXT DO (300) NEXT (240) DO FORGET .3 DO RESUME #1 (242) DO .1 <- .13 DO .2 <- .12 DO (2010) NEXT DO (250) NEXT PLEASE READ OUT ,2 DO READ OUT ,1 DO (210) NEXT (250) DO (260) NEXT PLEASE READ OUT ,3 DO READ OUT ,1 DO (210) NEXT (260) DO FORGET .3 DO RESUME #1 (300) DO READ OUT ,6 DO READ OUT .11 (301) DO READ OUT ,7 (550) DO .9 <- #8 DO .9 <- #1 (2000) DO (1010) NEXT DO .1 <- .3 DO .2 <- #64173 PLEASE DO (1039) NEXT DO .1 <- .3 PLEASE DO (1039) NEXT DO .1 <- .4 DO .2 <- #1 PLEASE DO (1010) NEXT PLEASE RESUME #1 (2010) DO (1010) NEXT DO .1 <- .3 DO .2 <- .3 PLEASE DO (1009) NEXT DO .1 <- .4 DO .2 <- #1 DO (1010) NEXT PLEASE RESUME #1 (909) DO COME FROM (301) PLEASE GIVE UP Sorry, that''s actually the source for something else I wrote a while ago; I haven''t written a frequency counter in INTERCAL yet - but it would be equally distressing. Perhaps only Language H would trump INTERCAL. :) Brendan
Brendan Gregg wrote:> G''Day Nathan, > > On Fri, 21 Apr 2006, Nathan Kroenert wrote: > >> Awk schmawk! >> >> Shell, with only one pipe! >> >> # dtrace -l | while read Z PRO Z; do [[ ${PROVS#* ${PRO} *} =>> ${PROVS} ]] && PROVS=" $PROVS $PRO " ; done ; echo $PROVS >> PROVIDER dtrace nfsmapid721 fasttrap proc sysinfo sched vminfo sdt io >> mib fbt syscall profile lockstat >> >> :)) > > Shell, schmell. > > Yes, it''s nice to avoid a fork/exec, but nothing beats INTERCAL for > strict simplicity, > > DO .11 <- #0 > PLEASE ABSTAIN FROM FORGETTING > DO ,1 <- #43OK, I''m going to submit an RFE; y''all can stop now. (oh, the humanity.)
> PLEASE GIVE UPI''m not sure if that''s you speaking to INTERCAL, or INTERCAL trying to speak to you...> Sorry, that''s actually the source for something else I wrote a while ago; > I haven''t written a frequency counter in INTERCAL yet - but it would be > equally distressing. > > Perhaps only Language H would trump INTERCAL. :)Indeed! OBEY, Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc
John Dewey wrote:> On Fri, Apr 21, 2006 at 12:38:16PM +1000, Brendan Gregg wrote: >> G''Day Dan, >> >> On Thu, 20 Apr 2006, Dan Mick wrote: >> >>> Is there a trick to listing available providers? I can''t find it. >> Not that I know of. I run "dtrace -l" through a simple frequency counter >> (which also tells me how many probes are in each provider), >> > > perl - smerl'' :P > > dtrace -l | awk ''{print $2}'' | sort | uniq -c | sortIf you are not concerned about ordering, you don''t need anywhere near that many processes. Awk is much more powerful than that! $ dtrace -l | awk '' $2 !~ /PROVIDER/ { n[$2]++; } END { for (p in n) printf("%d:%s\n",n[p],p)}'' 13:profile 1:fasttrap 15:proc 451:mib 46:fpuinfo 49:sched 462:syscall 12:io 66:sysinfo 49784:fbt 332:sdt 41:vminfo 3:dtrace 22:lockstat And I even skipped the titles ;) alan. -- Alan Hargreaves - http://blogs.sun.com/tpenta Staff Engineer (Kernel/VOSJEC/Performance) Product Technical Support (APAC) Sun Microsystems I''m going in the World''s Greatest shave for Leukaemia. See http://blogs.sun.com/tpenta?entry=raising_money_for_leukaemia_support
Reasonably Related Threads
- dtrace: failed to initialize dtrace: DTrace device not available on system
- Definition of "anchored" and "unanchored" probes
- virDomainGetInfo() returns wrong domain state
- Problem with names() in a plot after ordering a data.frame. Syntax or stupidity?
- posting for r-help