Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!prcrs!wrwalke From: wrwalke@prcrs.UUCP (William Walker) Newsgroups: comp.unix.questions Subject: Re: determining size of physical memory Keywords: core, physical memory, size of core Message-ID: <1369@prcrs.UUCP> Date: 31 Dec 90 23:54:01 GMT References: <1990Dec27.202715.27688@Neon.Stanford.EDU> <1368@prcrs.UUCP> <7325@plains.NoDak.edu> Organization: PRC Realty Systems, McLean, VA Lines: 20 In article <7325@plains.NoDak.edu>, bakke@plains.NoDak.edu (Jeffrey P. Bakke) writes: > In article <1990Dec27.202715.27688@Neon.Stanford.EDU>, hitt@Neon.Stanford.EDU (Daniel Hitt) writes: > > Is there a standard UNIX program or system call that determines > > the size of the physical memory of the machine on which it is > > running? > > I'd like to be able to do this on Ultrix, SunOS, and the NeXT OS, > > and possibly HP-UX. > > 'wc -c < /dev/mem' using the word count program to count the number of > bytes. I've found on most systems that it will return the correct physical > memory size (not swap space though). or how about ... dd if=/dev/mem of=/dev/null bs=1024 this one is a try-at-you-own-risc solution, but it works on vax ultrix 3.1 and s800 hp-ux 7.0. bill.