Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 22:33:03 -0800
From:      sean-freebsd-hackers@chittenden.org
To:        David Scheidt <dscheidt@tumbolia.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Easy way to compute memory stats? (procfs?)
Message-ID:  <20010319223303.K84536@rand.tgd.net>
In-Reply-To: <Pine.BSF.4.21.0103192354310.37794-100000@shell-2.enteract.com>; from "dscheidt@tumbolia.com" on Tue, Mar 20, 2001 at = 12:11:45AM
References:  <20010319183135.B84536@rand.tgd.net> <Pine.BSF.4.21.0103192354310.37794-100000@shell-2.enteract.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010319223303.K84536>