Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Physical memory

1 view
Skip to first unread message

Shanti Suresh

unread,
Nov 13, 2000, 3:00:00 AM11/13/00
to
Folks,

Is there a way to find out the physical memory installed on a SUN
workstation running Solaris 2.6, using native Solaris operating system commands?
Mostly "dmesg" gives you the boot messages, and you can find it out
there. But many times, the system messages knock out the boot messages,
so the Physical memory line doesn't appear in dmesg's output.

I came across the following options on the Web. Only option 2 uses
the operating system properties, but it also may be insufficient as noted.
--------------------------
(1) The "best" command for the job is "sysinfo". Sysinfo is public
        domain utility available via "anonymous" ftp on
        usc.edu in directory /pub/sysinfo.
(2)
        Note:  "wc -l /dev/mem" and "dd if=/dev/mem of=/dev/null" and
               the like will *not* give the correct answer on machines
               where physical memory is not contiguous, such as many Suns.
--------------------------
 

Thanks.

                                                        -Shanti

-- 
-----------------------------------------------------------------------------
              Shanti Suresh   E-mail: sha...@umich.edu

IT Communications Services               UNIX Sys. Administration/Programming
Information Technology Central Services  Network Management
University Of Michigan                   Network Engineering
-----------------------------------------------------------------------------
 

David Winkel

unread,
Nov 13, 2000, 3:00:00 AM11/13/00
to
prtconf

/usr/sbin/prtconf

Should print out lots of config information, if it's installed.

~~~~
Dave....@umich.edu
Senior Developer, Enlighten Inc.

I fear only fear. Oh, and possibly recursion.


Mark Montague

unread,
Nov 14, 2000, 3:00:00 AM11/14/00
to
On Mon, 13 Nov 2000, Shanti Suresh wrote:

> Is there a way to find out the physical memory installed on a SUN
> workstation running Solaris 2.6, using native Solaris operating system
> commands?

This question has already been answered in a previous post, but I
couldn't help responding too :) One of the things I love about
Unix is how well documented it is and how easy it is to write programs
to do little jobs. The easiest way by far is to run prtconf (Solaris)
sysinfo (most other Unix OSs), or top, but if for some reason you didn't
want to (maybe you're not on Solaris and don't have sysinfo or top
installed on your system), then you could compile and run the little
program that I've attached.

Save the attachment as "mem.c" and then compile with the command
"gcc -o mem mem.c" and run it with "./mem". If the gcc command gives
you an error, try "cc -o mem mem.c".

Type "man sysconf" to find out about the theory behind this program.
Note that on Solaris it will give you the amount of physical memory,
but on Linux the kernel holds back a few megs from the total.

Mark Montague
LS&A Information Technology
mark...@umich.edu

mem.c

Charles Clark

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to
David Winkel <dwi...@umich.edu> writes:
|prtconf
|
|/usr/sbin/prtconf
|
|Should print out lots of config information, if it's installed.

Also prtdiag, located in /usr/platform/`uname -i`/sbin/prtdiag,
although it may not be available on older (sun4c, sun4m) hardware.
prtdiag will tell you other useful hardware info besides memory size.

--
cmc ACGWB #1 PAW #4 DoD #1325
"Drove back to town this morning with working on my mind
I thought of maybe quitting, thought of leaving it behind
went back to bed this morning, and as I'm pulling down the blind
the sky was dull and hypothetical and falling one cloud at a time."
-- The Tragically Hip

0 new messages