On Fri, Apr 18, 2008 at 4:17 PM, Richard L. Hamilton <[EMAIL PROTECTED]> wrote: > > On Fri, Apr 18, 2008 at 7:32 AM, Richard L. Hamilton > > <[EMAIL PROTECTED]> wrote: > > > How does this behave with the -p option - does it just report > > > the current usage, or does it wait for the process to exit and > > > report its final usage? If the former (which I suspect is the case), > > > it might be handy to have an option to do the latter (if possible). > > > > Yes, it's the former. I looked into performing the latter, but I > > didn't find a reasonable way to do this. > > Hmm. pwait can get the psinfo as of when the process exits, > by using poll(2) to wait for the process to exit; the way I read > proc(4) suggests that should work on /proc/*/usage (or /proc/*/lusage > if LWP-level detail is desired) as well.
So apparently I didn't look hard enough when I looked at this earlier. ;-) I took a quick swipe at coding this up (based on pwait(1)), and it does work. I can make a cleaner pass at adding this to ptime(1) and post a webrev. > > > > > > > Other wishlist thoughts: > > > > > > * option for LWP-level detail > > > * option to report all the info in struct prusage, not just times. The second is easy enough, although I don't know that it would belong in ptime(1) per se. As you suggest, a separate command similar to rusage(1b) might be appropriate: prusage(1)? WRT the first, though, I'm curious what you want to see: the timing information for each thread as it terminates, with the total for the process when it exits? To be able to specify one thread that you want the information for? Something entirely different? Chad _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org