DTrace Gurus, Is there a way to truncate multiple aggregations collectively? For Example, to display 20 or less records for the below: ... @a[pid,self->addr,self->name,self->id] = sum(itema); @b[pid,self->addr,self->name,self->id] = sum(itemb); @c[pid,self->addr,self->name,self->id] = sum(itemc); @d[pid,self->addr,self->name,self->id] = sum(itemd); @e[pid,self->addr,self->name,self->id] = sum(iteme); ... trunc(@a, @b, @c, @d, @e, ..., 20); ... printa("%5s %@3d %@3d %@3d %@3d %@3d %a %s/%d\n", %a, %b, %c, %d, %e); ... Cheers, Joel.
Hi Joel,> Is there a way to truncate multiple aggregations collectively?No. The trunc() function just operates on a single aggregation. Jon.> > For Example, to display 20 or less records for the below: > ... > @a[pid,self->addr,self->name,self->id] = sum(itema); > @b[pid,self->addr,self->name,self->id] = sum(itemb); > @c[pid,self->addr,self->name,self->id] = sum(itemc); > @d[pid,self->addr,self->name,self->id] = sum(itemd); > @e[pid,self->addr,self->name,self->id] = sum(iteme); > ... > trunc(@a, @b, @c, @d, @e, ..., 20); > ... > printa("%5s %@3d %@3d %@3d %@3d %@3d %a %s/%d\n", > %a, %b, %c, %d, %e); > ... > > > Cheers, > Joel. > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
>> Is there a way to truncate multiple aggregations collectively? > > No. The trunc() function just operates on a single aggregation.It might be a useful RFE. Joel, please file it if you can come up with a sufficiently precise specification. Adam -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
On 09/29/09 11:16, Adam Leventhal wrote:>>> Is there a way to truncate multiple aggregations collectively? >> >> No. The trunc() function just operates on a single aggregation. > > It might be a useful RFE. Joel, please file it if you can come up with a > sufficiently precise specification. > > Adam > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl >Adam, I am working on it... Trying to pull together a full suggested fix. About 70% there...CR 6886770. Thanks, Joel.