From owner-freebsd-hackers Mon Mar 19 22:13:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.enteract.com (mail.enteract.com [207.229.143.33]) by hub.freebsd.org (Postfix) with ESMTP id 4A12E37B71D for ; Mon, 19 Mar 2001 22:13:37 -0800 (PST) (envelope-from dscheidt@tumbolia.com) Received: from shell-2.enteract.com (shell-2.enteract.com [207.229.143.41]) by mail.enteract.com (8.11.1/8.11.2) with ESMTP id f2K6BjG69141; Tue, 20 Mar 2001 00:11:46 -0600 (CST) (envelope-from dscheidt@tumbolia.com) Date: Tue, 20 Mar 2001 00:11:45 -0600 (CST) From: David Scheidt X-Sender: dscheidt@shell-2.enteract.com To: sean-freebsd-hackers@chittenden.org Cc: freebsd-hackers@freebsd.org Subject: Re: Easy way to compute memory stats? (procfs?) In-Reply-To: <20010319183135.B84536@rand.tgd.net> 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 On Mon, 19 Mar 2001 sean-freebsd-hackers@chittenden.org wrote: : Is there an easy way (from script ideally) to get the following :stats: : :free physical mem (avail ram) 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. :free swap pstat(8) will tell you this :total avail mem Do you mean physical memory, in which case the value of hw.physmem will tellyou. -- dscheidt@tumbolia.com Bipedalism is only a fad. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message