On Mon, 13 May 2002, Zhihui Zhang wrote: > A process can sleep for various reasons such as memory, I/O etc. Is there > a way to collect statistics about how long it sleeps for different > reasons? Thanks.
I don't think it's actually accounted for anywhere, but if a process does go to sleep the WCHAN will be filled in and visible in top and ps. You could write a program to collect the WCHANs every so often and build some course stats. And if you really wanted to get fancy it might not be too hard to build a scheduler or hz-driven procedure to log them directly in the kernel. Doug White | FreeBSD: The Power to Serve [EMAIL PROTECTED] | www.FreeBSD.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message