From owner-freebsd-hackers Wed Aug 16 12: 6:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhost.cpsc.ucalgary.ca (mailhost.cpsc.ucalgary.ca [136.159.2.100]) by hub.freebsd.org (Postfix) with ESMTP id 4130A37C644 for ; Wed, 16 Aug 2000 12:05:58 -0700 (PDT) (envelope-from rhyason@cpsc.ucalgary.ca) Received: from csh (csh.cpsc.ucalgary.ca [136.159.5.21]) by mailhost.cpsc.ucalgary.ca (1.3) id ; Wed, 16 Aug 2000 12:54:32 -0600 (MDT) Date: Wed, 16 Aug 2000 12:54:32 -0600 (MDT) From: Jeff Rhyason X-Sender: rhyason@csh To: hackers@freebsd.org Cc: chuckr@picnic.chuckr.org, peter.jeremy@alcatel.com.au, bright@wintelcom.net, jeff@rhyason.com Subject: Re: Collecting waiting statistics (simulation question) 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 Alphred Perlstein wrote: > Using sysctls is probably the easiest way of doing it. I am so stupid, Alphred, I did not think sysctl's could be used to provide access to arrays. I should have looked more. Chuck Robey wrote: >Occaisonally, but you'd do better hitting this list in general. I'm on a >new job and I'm giving it a LOT of hours; you might wait a week for me to >find time to generate an answer. It depends on your questions, too. If >you demonstrate by your question's topic and focus that you've made a >*hard* effort to answer it on yourself, *loads* of folks will help. If >it looks like just another person looking for a free ride (and there's so >many of those that we get a bit defensive) then you wouldn't expect too >much. Free ride? No way ;) I'm enjoying this project too much! However I definitely needed (and appreciated!) finding out if the code had been written before, and ways of going about it. Peter Jeremy wrote: > Pruning out the general-purpose bits of code, you could use > something like the following: > ... Thanks VERY much to everyone who replied to my message, particularly your code Peter! I put it to successful use! What I did was implement a circular buffer of kern_malloc_stats-like structs, accessible with sysctl's. The magic that gets done with sysctl header files, I may never figure out ;) However mmapping kvm, as you suggest, would have been a faster way to go, I did not think of that. Thanks to everybody. If anyone wants to see the code, just let me know. I thought about posting it, but it's pretty close to Peter's. Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message