From owner-freebsd-hackers Mon Mar 19 22:33:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.tgd.net (rand.tgd.net [64.81.67.117]) by hub.freebsd.org (Postfix) with SMTP id 9DFB737B728 for ; Mon, 19 Mar 2001 22:33:14 -0800 (PST) (envelope-from sean@mailhost.tgd.net) Received: (qmail 85286 invoked by uid 1001); 20 Mar 2001 06:33:03 -0000 Date: Mon, 19 Mar 2001 22:33:03 -0800 From: sean-freebsd-hackers@chittenden.org To: David Scheidt Cc: freebsd-hackers@freebsd.org Subject: Re: Easy way to compute memory stats? (procfs?) Message-ID: <20010319223303.K84536@rand.tgd.net> References: <20010319183135.B84536@rand.tgd.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="81JctsDUVPekGcy+" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from "dscheidt@tumbolia.com" on Tue, Mar 20, 2001 at = 12:11:45AM X-PGP-Key: 0x1EDDFAAD X-PGP-Fingerprint: C665 A17F 9A56 286C 5CFB 1DEA 9F4F 5CEF 1EDD FAAD X-Web-Homepage: http://sean.chittenden.org/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --81JctsDUVPekGcy+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > : Is there an easy way (from script ideally) to get the following > :stats: > : > :free physical mem (avail ram) >=20 > This is going to be quite small on any busy machine, or machine that > has a reasonable uptime. The VM system will cache things unless > there's a demand for memory. vm.stats.vm.v_free_count has the value > in it, but quite often will be quite a bit lower than the amount of > memory that would be available if the system were under memory > pressure. If you look at top's output, there is a value labled > cache. The pages in this queue are clean, and can be discarded > without needing to write them to backing store. The number the > system tells you isn't very useful without knowing what the system > is doing. Drat. I was hoping to arrive at a number similar to top's Free column. Right now the vm stat from sysctl is about 25% of what top's reporting (256MB physical). At the same time... the free pages may be a good value for me to toss around given that I'm also including the load and some statistics of the host's past. > :free swap >=20 > pstat(8) will tell you this Duh, thanks. > :total avail mem >=20 > Do you mean physical memory, in which case the value of hw.physmem will > tellyou. =20 Phys mem + swap, which I think I can calc pretty easily now that I have swap. -sc --=20 Sean Chittenden sean@chittenden.org --81JctsDUVPekGcy+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: For info see http://www.gnupg.org iEYEARECAAYFAjq2+Z8ACgkQn09c7x7d+q0cqgCffzZ2WFOVZvtgG0owL2FZ9ZKS nxIAn2VM+D9RPW6o6h6fnDM8B7WYokLn =u8t3 -----END PGP SIGNATURE----- --81JctsDUVPekGcy+-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message