determining size of physical memory
Jeffrey P. Bakke
bakke at plains.NoDak.edu
Sat Dec 29 08:07:23 AEST 1990
In article <1990Dec27.202715.27688 at Neon.Stanford.EDU>, hitt at 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 at plains.NoDak.edu | jokes in the world...
UUCP : ...!uunet!plains!bakke | The overflow began
BITNET : bakke at plains.bitnet | decades ago.
"I am not a number, I am a free man!" - The Prisoner
More information about the Comp.unix.questions
mailing list