From owner-freebsd-questions Mon May 3 16:42: 0 1999 Delivered-To: freebsd-questions@freebsd.org Received: from sol (cs1-gw.cs.binghamton.edu [128.226.171.72]) by hub.freebsd.org (Postfix) with SMTP id 22F5E156A6 for ; Mon, 3 May 1999 16:41:58 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from localhost (zzhang@localhost) by sol (SMI-8.6/8.6.9) with SMTP id TAA01967; Mon, 3 May 1999 19:31:23 -0400 Date: Mon, 3 May 1999 19:31:23 -0400 (EDT) From: Zhihui Zhang To: Doug White Cc: freebsd-questions@FreeBSD.ORG Subject: Re: cat /dev/mem | wc -c (root fs full) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Mon, 3 May 1999, Zhihui Zhang wrote: > > > > > Sometime ago, I found on the web that I can use the special device > > /dev/mem to determine the amount of physical memory the machine has. So I > > run the following command: > > > > # date; cat /dev/mem | wc -c ; date > > > > But it seems to run forever (at least hours). Is there something wrong? > > /dev/mem is a bit nutty. Use sysctl hw.physmem instead. Thanks for the response. Right now, it seems that I have a clue as to why the cat /dev/mem is not working. I just find that my root filesystem is full! Although I am not absolutely sure, running cat /dev/mem for a long long time may be the cause. # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/wd0s2a 31743 31663 -2459 108% / /dev/wd0s2f 4539509 686538 3489811 16% /usr /dev/wd0s2e 29751 2871 24500 10% /var procfs 4 4 0 100% /proc Maybe the pipe (a temporary file) between /dev/mem and wc becomes too big for the system to handle. Am I right? Thanks for your help. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message