Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2002 21:15:16 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Collect process sleeping statistics
Message-ID:  <20020514211310.I70761-100000@resnet.uoregon.edu>
In-Reply-To: <Pine.SOL.4.21.0205131827300.27709-100000@opal>

next in thread | previous in thread | raw e-mail | index | archive | help
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
dwhite@resnet.uoregon.edu     |  www.FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020514211310.I70761-100000>