From owner-freebsd-hackers Mon Aug 14 17:53:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.chuckr.org (picnic.chuckr.org [216.254.96.118]) by hub.freebsd.org (Postfix) with ESMTP id 697E437B5E2 for ; Mon, 14 Aug 2000 17:53:40 -0700 (PDT) (envelope-from chuckr@picnic.chuckr.org) Received: from localhost (chuckr@localhost) by picnic.chuckr.org (8.9.3/8.9.3) with ESMTP id UAA03517; Mon, 14 Aug 2000 20:53:50 -0400 (EDT) (envelope-from chuckr@picnic.chuckr.org) Date: Mon, 14 Aug 2000 20:53:50 -0400 (EDT) From: Chuck Robey To: Jeff Rhyason Cc: hackers@FreeBSD.ORG Subject: Re: Collecting waiting statistics (simulation question) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 14 Aug 2000, Jeff Rhyason wrote: > > A lot of sysctls implement some sort of statistics mechanism > > such as counters. Do a 'sysctl -a' and you'll see various > > sysctls being used for counters/stats. > > Aah. This isn't quite what I lust for: Is it possible to get a *log* of > allocation requests rather than aggregate sums or averages? The reason is > so I can calculate the distribution of the data. For example: the kind of > information I would like to have from kern_malloc for each invocation is: > - time of the allocation > - size > - time spent in asleep > - return value > The same thing can be done with kern_free and from there the time the > memory was used can be calculated. So write it. It wouldn't be terribly difficult. I don't think it'd be terribly popular (so you won't be able to talk someone here into doing it for you) but you could grab an idea for the communications & logging from syslog (using a daemon & a socket) and just instrument the right parts of the kernel to write to the socket. You'd have to write the daemon & write a bit of code in the kernel. It would be a reasonably simple project. ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, FreeBSD, chuckr@picnic.chuckr.org| electronics, communications, and signal processing. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message