[comp.sys.sun] how is memory configured?

david@wubios.wustl.edu (David J. Camp) (03/05/90)

We were led to believe that we had 16MB of ram in our Sun 3/260.  However,
the 'top' program reports that we only have 5-6MB.  Either top is broken,
top is reporting something other than real memory, we have not properly
configured the memory on our computer, or we do not really have the 16MB
we thought we have.

Can anyone suggest:
    1)  How can we determine how much memory is installed?
    2)  How is SunOS told how much memory to use?
    3)  What is top reporting?
    4)  How can we make sure we are using the full 16MB?

Thank you very much.

Bitnet:   david@wubios.wustl                ^      Mr. David J. Camp
Internet: david%wubios@wugate.wustl.edu   < * >    Box 8067, Biostatistics
uucp:     uunet!wugate!wubios!david         v      660 South Euclid
Washington University (314) 36-23635               Saint Louis, MO 63110

kensmith@cs.buffalo.edu (Ken Smith) (03/13/90)

In article <5511@brazos.Rice.edu>, david@wubios.wustl.edu (David J. Camp)
writes:
> We were led to believe that we had 16MB of ram in our Sun 3/260.  However,
> the 'top' program reports that we only have 5-6MB.  Either top is broken,
> top is reporting something other than real memory, we have not properly
> configured the memory on our computer, or we do not really have the 16MB
> we thought we have.
> 
> Can anyone suggest:
>     1)  How can we determine how much memory is installed?

The easiest approach is to check the 'mem = ...' messages when the machine
boots.  These messages are also stored in /var/adm/messages* (may be
several files...).  If your machine has been up a long time then the
messages files probably won't have a record of a boot.  Below is a short
program that seems to work on straight BSD systems, a couple BSD
derivatives, and all the SunOS's I've tried (4.0 through 4.1BETA).

>     2)  How is SunOS told how much memory to use?

It figures it out on its own by trying to access memory pages.  There are
eeprom settings related to memory but that tells the ROM monitor routines
how much memory to test when the machine is reset, before attempting to
boot the operating system.  As far as I can tell the values kept in eeprom
are completely ignored by the kernel.

>     3)  What is top reporting?

I don't have a copy of top handy but I'd guess it's either showing you how
much memory is in use or how much is not in use at the time.  Related
programs are vmstat and pstat.

>     4)  How can we make sure we are using the full 16MB?

If SunOS knows it's there then it will use it...

						Ken Smith

internet:	kensmith@cs.buffalo.edu
bitnet:		kensmith%cs.buffalo.edu@ubvm.bitnet

[[Note: Memory routine placed in archives. -bdg]]

FTP: 	Hostname : titan.rice.edu (128.42.1.30)
	Directory: sun-source
	Filename : mem.c

Archive Server Address: archive-server@rice.edu
Archive Server Command: send sun-source mem.c

david@wubios.wustl.edu (David J. Camp) (10/08/90)

In Reply to this Note From: <wsd@cs.brown.edu>
>
>   We were led to believe that we had 16MB of ram in our Sun 3/260.  However,
>   the 'top' program reports that we only have 5-6MB.  Either top is broken,
>   top is reporting something other than real memory, we have not properly
>   configured the memory on our computer, or we do not really have the 16MB
>   we thought we have.
>
>   Can anyone suggest:
>       1)  How can we determine how much memory is installed?
>       2)  How is SunOS told how much memory to use?
>       3)  What is top reporting?
>       4)  How can we make sure we are using the full 16MB?

I received various reeponses.  The simplest is to look at your
/var/adm/messages because this number is reported at boot time.  Another
suggested I open the computer and look at the boards, but I am certain I
do not know enough to make sense out of raw hardware.  Another suggested
looking at the source of 'top' to see what it is doing. 

My /var/adm/messages file reports 16MB, but top still reports something
quite different.  I have not bothered to do the latter suggestions.

david@wubios.wustl.edu                 ^        Mr. David J. Camp
david%wubios@wugate.wustl.edu        < * >      +1 314 382 0584
...!uunet!wugate!wubios!david          v