From owner-freebsd-questions Wed Jul 26 14:42:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (zoom2-015.telepath.com [216.14.2.15]) by hub.freebsd.org (Postfix) with SMTP id 61CFA37BFD9 for ; Wed, 26 Jul 2000 14:42:44 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 22609 invoked by uid 100); 26 Jul 2000 21:42:30 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14719.23366.188789.26018@guru.mired.org> Date: Wed, 26 Jul 2000 16:42:30 -0500 (CDT) To: Robert Sexton Cc: questions@FreeBSD.ORG Subject: Re: How to monitor paging activity? In-Reply-To: References: X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: Robert Sexton > > I'm working on some rrd based monitoring tools, using sysctl to > extract the info I need. I've got the vm stuff ala top working, > but I cant figure out the sysctl variables that will identify paging > and swapping behaviour. I suspect that the numbers I need are in here > someplace, but I'm not sure. I'd say you're doing it the wrong way, but I'm lazy. vmstat already does the work, can be used to extract all the information you're interested in, and *is maintained by somebody else*. If you want a GUI that lets you set buttons and then gives you a graphical output of system paging activity over time, a wrapper around vmstat would be straightforward. Further, what you're contemplating would probably only work on FreeBSD from the date the last variable of interest was added onward (do the other BSDen have them?). A wrapper could be built that would provide minimal functionality on most version of Unix, and full functionality on a wider range of platforms than anything that uses sysctl. Look through the system monitors in /usr/ports/sysutils to see how they deal with portability. Of course, you may find what you're looking for there anyway. > Anybody know where these are documented? If you *really* want to read the data yourself (or are interested in learing about the vm system), the best I could find for those is the source to vmstat. It uses nlist instead of sysctl to get the data, but the names are the same. Use the source,