From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 20 09:18:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBF6D16A420 for ; Wed, 20 Jul 2005 09:18:01 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 859A843D46 for ; Wed, 20 Jul 2005 09:18:01 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 85E20A2FDE; Wed, 20 Jul 2005 11:18:00 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id 657796462; Wed, 20 Jul 2005 11:18:00 +0200 (CEST) Date: Wed, 20 Jul 2005 11:18:00 +0200 From: Marc Olzheim To: =?iso-8859-1?Q?=D6zkan?= KIRIK Message-ID: <20050720091800.GB27390@stack.nl> References: <42DE0E91.9000607@mersin.edu.tr> <20050720085658.GA27390@stack.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline In-Reply-To: <20050720085658.GA27390@stack.nl> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: Real and Free Memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 09:18:02 -0000 --ftEhullJWpWg/VHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 20, 2005 at 10:56:58AM +0200, Marc Olzheim wrote: > On Wed, Jul 20, 2005 at 11:42:57AM +0300, zkan KIRIK wrote: > > Hi, > >=20 > > i am trying to measure free memory and real memory. > >=20 > > but values at dmesg.boot and sysctl are diffrent. > >=20 > > # cat /var/run/dmesg.boot | grep real > > real memory =3D 268435456 (256 MB) > >=20 > > # sysctl vm.vmtotal | grep Real > > Real Memory: (Total: 232792K Active 122448K) > >=20 > > As above, values are not equal, > > so that, i cant trust the Free Memory value that sysctl gives. > >=20 > > how can i get right values? >=20 > sysctl hw.physmem Let me be a bit more precise: sysctl vm.stats.vm will show you all the memory info you need in the vm system, as in: pageable memory. It's shown in number of pages (usually 4K: vm.stats.vm.v_page_size). Keep in mind that 'free' memory depends on the way you look at it. Pages that contain still caching synced-on-disk data (inactive pages) can be considered 'free' as well as any 'free' page. See http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html#TOP-MEMORY-= STATES Marc --ftEhullJWpWg/VHq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC3hbIezjnobFOgrERApshAJ0U0GbuRYXPZri9HQk8Z/72toXrswCdHM3w JkpEgsueCeuUGPzJ7+T/flw= =Vh9H -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq--