> After the printa I think you need a 
> trunc.
> >    trunc(@a);
> 
> Shouldn`t your output be
> pid, tid, time in seconds ?
> is this output post processed ?
> 
> what does the original output look like ?
> rick
> 
> PS
> I would think timestamp/nanosec would be subject to
> rounding errors.
> 
> 
> On Thu, Jul 15, 2010 at 01:49:05PM -0700, tester
> wrote:
> > X-CAA-SPAM: N00000
> > X-Authority-Analysis: v=1.1
> cv=C5hH5D9sZx7oBLYfm9Qeni98yGeIDIO6Mit34naBfEk=
> >     c=1 sm=1 a=Rf9Kass9ZIkA:10 a=ood2b7iyd8MA:10
> a=mMDRw7eodGMA:10
> >     a=kj9zAlcOel0A:10 a=zRG8QCroJ/deLx9kZ5Uhsg==:17
> a=ep_KMAzDAAAA:8
> >     a=Dc4nqrrUMXSxFipiTD0A:9
> a=jCEtMmcRhls7fIlIBkU65qnZ4ocA:4
> >     a=CjuIK1q_8ugA:10 a=RD1bzJOsQUcA:10
> a=TC1Ce7_l9HwA:10
> >     a=t6jm5M9rnSlXE7un:21 a=1GJxXsc5shYW460U:21
> >     a=zRG8QCroJ/deLx9kZ5Uhsg==:117
> > X-Spam-Checker-Version: SpamAssassin 3.3.1
> (2010-03-16) on
> >     lv-drc6.opensolaris.org
> > X-Spam-Level: 
> > X-Spam-Status: No, score=-1.0 required=5.0
> tests=AWL,BAYES_00,FREEMAIL_FROM,
> >     RDNS_NONE,T_TO_NO_BRKTS_FREEMAIL autolearn=no
> version=3.3.1
> > X-Original-To: dtrace-discuss@opensolaris.org
> > Delivered-To: dtrace-discuss@opensolaris.org
> > Date: Thu, 15 Jul 2010 13:49:05 PDT
> > From: tester <solaris.ident...@gmail.com>
> > To: dtrace-discuss@opensolaris.org
> > Subject: [dtrace-discuss] precision thread CPU
> usage
> > X-BeenThere: dtrace-discuss@opensolaris.org
> > X-Mailman-Version: 2.1.13
> > Precedence: list
> > List-Id: DTrace General Discussion
> <dtrace-discuss.opensolaris.org>
> > List-Unsubscribe:
> >
>       <http://mail.opensolaris.org/mailman/options/dtrace-d
> iscuss>,
> >
>       <mailto:dtrace-discuss-requ...@opensolaris.org?subjec
> t=unsubscribe>
> > List-Archive:
> <http://mail.opensolaris.org/pipermail/dtrace-discuss>
> > List-Post: <mailto:dtrace-discuss@opensolaris.org>
> > List-Help:
> <mailto:dtrace-discuss-requ...@opensolaris.org?subject
> =help>
> > List-Subscribe:
> >
>       <http://mail.opensolaris.org/mailman/listinfo/dtrace-
> discuss>,
> >
>       <mailto:dtrace-discuss-requ...@opensolaris.org?subjec
> t=subscribe>
> > Errors-To: dtrace-discuss-boun...@opensolaris.org
> > 
> > Hi,
> > 
> > I am trying to figure out accurate thread CPU
> utilization using the sched provider. When I sample
> for 5 seconds and multiply by the number of CPU
> threads, the reported seconds exceeds 5s X number of
> CPU threads.
> > 
> > sched:::on-cpu
> > /self->ts == 0/
> > {
> >    self->ts = timestamp/nanosec;
> > }
> > 
> > sched:::off-cpu
> > /self->ts != 0/
> > {
> > 
> >    @a[pid,tid] = sum((timestamp/nanosec) -
> self->ts);
> >    self->ts = 0;
> > 
> > }
> > 
> > tick-5s {
> > 
> >    trunc(@a,10);
> >    printa(@a);
> > 
> > }
> > 
> > =====================
> > Here is the output
> > 
> >         3-------------1----------3
> >      1982----------165-------3
> >      6039----------52571---3
> >     12110---------6006-----6
> >      1982----------25785---8
> >      1982----------25930--8
> >     12110---------5996-----9
> >      6039----------52902----12
> >     11359----------3006-----14
> >         0-------------0----------4751
> > 
> > The  total of the above exceeds 5X256 (T5440 with
> 256CPU threads). Any ideas?
> > 
> > Thanks
> > -- 
> > This message posted from opensolaris.org
> > _______________________________________________
> > dtrace-discuss mailing list
> > dtrace-discuss@opensolaris.org
> 
> -- 
> 
> Rickey C. Weisner 
> Software Development and Performance Specialist 
> Principal Software Engineer
> Systems Quality Office
> Oracle Corporation
> cell phone: 615-308-1147
> email: rick.weis...@oracle.com
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org
> 

Rick,

That was it, I was missing the last trunc. I feel so dumb. The o/p I showed 
earlier is pid, tid and seconds. Thanks for pointing the rounding errors also.

Thanks
-- 
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to