Howdy, I read through Brendan Gregg''s zvmstat D script, and noticed that Brendan used a home built loop to iterate over all the zones in the ''syscall::write:return'' probe. Brendan mentioned that aggregations would be better suited for this, but I can''t seem to find an example that correlates values from different aggregations. So given the following DTrace: mib:::tcpActiveOpens { @activeopens[execname] = count(); } mib:::tcpPassiveOpens { @passiveopens[execname] = count(); } Is there an easy way to print something like the following (or is there a better way to arrange the script to achieve this) every 60-seconds in a tick statement: Process ActiveOpens PassiveOpens ------- ----------- ------------ sqlplus 3 0 nc 2 0 httpd 0 213 I assume there is, but wasn''t able to find anything in the users guide (if I missed this in the users guide, please let me know). Thanks, - Ryan ============================================================== Matty : UNIX Administrator : GPG ID: 92D5DFFF Home/BLOG : http://daemons.net/~matty Public Key : http://daemons.net/~matty/public_key.txt Fingerprint : 4BEC 6145 30A6 BCE6 5602 FF11 4954 165D 92D5 DFFF ===============================================================
On Fri, Oct 28, 2005 at 03:20:20PM -0400, Matty wrote:> > Howdy, > > I read through Brendan Gregg''s zvmstat D script, and noticed that Brendan > used a home built loop to iterate over all the zones in the > ''syscall::write:return'' probe. Brendan mentioned that aggregations would be > better suited for this, but I can''t seem to find an example that correlates > values from different > aggregations. So given the following DTrace: > > mib:::tcpActiveOpens > { > @activeopens[execname] = count(); > } > > mib:::tcpPassiveOpens > { > @passiveopens[execname] = count(); > } > > Is there an easy way to print something like the following (or is there a > better way to arrange the script to achieve this) every 60-seconds in a > tick statement: > > Process ActiveOpens PassiveOpens > ------- ----------- ------------ > sqlplus 3 0 > nc 2 0 > httpd 0 213 > > I assume there is, but wasn''t able to find anything in the users guide (if > I missed this in the users guide, please let me know).Bryan is actively working on this; the plan is to allow multiple aggregations as arguments to printa(). For now, you''ll need to correlate the output by hand or in a post-processing script. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development
On Fri, 28 Oct 2005, Jonathan Adams wrote:> On Fri, Oct 28, 2005 at 03:20:20PM -0400, Matty wrote: >> >> Howdy, >> >> I read through Brendan Gregg''s zvmstat D script, and noticed that Brendan >> used a home built loop to iterate over all the zones in the >> ''syscall::write:return'' probe. Brendan mentioned that aggregations would be >> better suited for this, but I can''t seem to find an example that correlates >> values from different >> aggregations. So given the following DTrace: >> >> mib:::tcpActiveOpens >> { >> @activeopens[execname] = count(); >> } >> >> mib:::tcpPassiveOpens >> { >> @passiveopens[execname] = count(); >> } >> >> Is there an easy way to print something like the following (or is there a >> better way to arrange the script to achieve this) every 60-seconds in a >> tick statement: >> >> Process ActiveOpens PassiveOpens >> ------- ----------- ------------ >> sqlplus 3 0 >> nc 2 0 >> httpd 0 213 >> >> I assume there is, but wasn''t able to find anything in the users guide (if >> I missed this in the users guide, please let me know). > > Bryan is actively working on this; the plan is to allow multiple > aggregations as arguments to printa(). For now, you''ll need to > correlate the output by hand or in a post-processing script.Thanks for the feedback Jonathon! I saw that Bryan was working on sort options, but must have missed this capability. Thanks for all the awesome DTrace goodies!! - Ryan ============================================================== Matty : UNIX Administrator : GPG ID: 92D5DFFF Home/BLOG : http://daemons.net/~matty Public Key : http://daemons.net/~matty/public_key.txt Fingerprint : 4BEC 6145 30A6 BCE6 5602 FF11 4954 165D 92D5 DFFF ===============================================================