[dtrace-discuss] How do I unroll an aggregation?
Adam Leventhal
ahl at eng.sun.com
Wed Jan 31 10:29:49 PST 2007
Hi Ian,
The best way is probably to use a different aggregation for each of the
columns (e.g. @io_r and @io_w) and then use printa with multiple
aggregations. This feature was introduces in snv_30 and should be in the
next update to Solaris 10.
Check out this thread from 2005:
http://www.opensolaris.org/jive/thread.jspa?messageID=13704㖈
Adam
On Wed, Jan 31, 2007 at 12:28:33PM -0500, Ian Matchett wrote:
> How do I unroll an aggregation?
>
> I want to printout @Io[R,], at Io[W,] , @Size[R,], at Size[W,] and
> @Time[R,], at Time[W,] all on the same line.
> 1 line per file that I am monitoring?
>
> How do I unroll the values out of the aggregation?
>
> {
>
> self->rw="R"
> or
> self->rw="W";
>
> self->vpath="/full/path/name/to/file/*";
>
> @Size[self->rw, self->vpath]=sum( self->size );
> @Io[self->rw, self->vpath]=count();
> @Time[self->rw, self->vpath]=avg( timestamp-self->start );
> }
>
>
>
> profile:::tick-TIMEsec
> {
> normalize( @Size, (1024 * TIME ));
> normalize( @Io, TIME );
> normalize( @Time, 1000);
> printf(" r/s w/s kr/s kw/s wait actv wsvc_t asvc_t w b device\n");
> printa( @Size );
> printa( @Io );
> printa( @Time );
> clear( @Size );
> clear( @Io );
> clear( @Time );
>
> }
>
> --
> Ian Matchett Sun Microsystems
> Burlington MA 01803 USA
> Phone x22043 781-442-2043
> Email <mailto:Ian.Matchett at Sun.COM>
> Mobile 413 237 6599
> Vtext Webservice
> <http://www.vtext.com/customer_site/jsp/messaging_lo.jsp?min=ian.matchett@vtext.com>
> SMS Email <mailto:Ian.Matchett at vtext.com>
> Map and Hotels
> <http://www.mapquest.com/maps/map.adp?formtype=address&cat=Hotels&zipcode=01803-2756>
> Sun.COM <http://www.sun.com/> Solaris Download
> <http://www.sun.com/software/solaris/get.jsp>
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
--
Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
More information about the dtrace-discuss
mailing list