[dtrace-discuss] track program time - need some guidelines

Chad Mynhier
2009-07-12T19:13:09Z

On Sun, Jul 12, 2009 at 1:28 PM, James
Litchfield<James.Litchfield at sun.com> wrote:
> It goes back to what problem is being solved.
>
> A) ptime requires that it start the app. It can''t
> ? ?attach to a running app. It aggregates all the
> ? ?data and does not offer a per-lwp breakdown.
> ? ?Given the mechanisms it uses, that''s all it can do.
> ? ?If that''s adequate then the problem is solved.

Actually, the version of ptime that Jim''s talking about _can_ attach
to a running app.  I added the -p option to do just that.  (Of course,
it won''t attach to a running app and then wait until it completes, it
only attaches long enough to grab a snapshot of the microstate stats.)

For example:

# ptime -mp `pgrep nscd`

real 29:45:57.427092032
user        1.852038785
sys         2.133489810
trap        0.005027352
tflt        0.000000000
dflt        0.000009597
kflt        0.000000000
lock 29:45:54.115500466
slp  773:53:38.737153459
lat         0.105180668
stop        0.017284688
#

Chad