Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!plains!bakke From: bakke@plains.NoDak.edu (Jeffrey P. Bakke) Newsgroups: comp.unix.questions Subject: Re: determining size of physical memory Keywords: core, physical memory, size of core Message-ID: <7325@plains.NoDak.edu> Date: 28 Dec 90 21:07:23 GMT References: <1990Dec27.202715.27688@Neon.Stanford.EDU> <1368@prcrs.UUCP> Organization: North Dakota State University, Fargo Lines: 22 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. Well, I'm not positive that this is the best way or the that it will work correctly under all instances but if you have read access to the /dev/mem (or /dev/kmem) you might just try '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). -- Jeffrey P. Bakke | There are a finite number of INTERNET: bakke@plains.NoDak.edu | jokes in the world... UUCP : ...!uunet!plains!bakke | The overflow began BITNET : bakke@plains.bitnet | decades ago. "I am not a number, I am a free man!" - The Prisoner