determining size of physical memory
William Walker
wrwalke at prcrs.UUCP
Tue Jan 1 10:54:01 AEST 1991
In article <7325 at plains.NoDak.edu>, bakke at plains.NoDak.edu (Jeffrey P. Bakke) writes:
> 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.
>
> '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.
More information about the Comp.unix.questions
mailing list