Number of CPU and Memory information in SunOS server?

I have SunOS and here is the version details

SunOS chfdalsun003 5.10 Generic_138888-03 sun4u sparc SUNW,Sun-Fire-V890

I have couple of questions.

How do i see number of CPU's in the server?

How can i see the Server memory(RAM)? The detail memory information like(total, used, free etc). In Linux, we have free command... but what is the equal command here?

Any help is highly appreciated...

You can use "prtdiag" to display the installed CPUs and memory. This is from a Sunfire V490 with 4 CPUs and 32 GB memory:

# prtdiag
System Configuration:  Sun Microsystems  sun4u Sun Fire V490
System clock frequency: 150 MHz
Memory size: 32768 Megabytes

========================= CPUs ===============================================

          Run   E$  CPU     CPU
Brd  CPU  MHz   MB  Impl.   Mask
--- ----- ---- ---- ------- ----
 A  0, 16 1800 32.0 US-IV+   2.2
 B  1, 17 1800 32.0 US-IV+   2.2
 A  2, 18 1800 32.0 US-IV+   2.2
 B  3, 19 1800 32.0 US-IV+   2.2

========================= Memory Configuration ===============================

          Logical  Logical  Logical
     MC   Bank     Bank     Bank         DIMM    Interleave  Interleaved
Brd  ID   num      size     Status       Size    Factor      with
---  ---  ----     ------   -----------  ------  ----------  -----------
 A    0     0      2048MB   no_status    1024MB     8-way        0
 A    0     1      2048MB   no_status    1024MB     8-way        0
 A    0     2      2048MB   no_status    1024MB     8-way        0
 A    0     3      2048MB   no_status    1024MB     8-way        0
 A    2     0      2048MB   no_status    1024MB     8-way        0
 A    2     1      2048MB   no_status    1024MB     8-way        0
 A    2     2      2048MB   no_status    1024MB     8-way        0
 A    2     3      2048MB   no_status    1024MB     8-way        0
 B    1     0      2048MB   no_status    1024MB     8-way        1
 B    1     1      2048MB   no_status    1024MB     8-way        1
 B    1     2      2048MB   no_status    1024MB     8-way        1
 B    1     3      2048MB   no_status    1024MB     8-way        1
 B    3     0      2048MB   no_status    1024MB     8-way        1
 B    3     1      2048MB   no_status    1024MB     8-way        1
 B    3     2      2048MB   no_status    1024MB     8-way        1
 B    3     3      2048MB   no_status    1024MB     8-way        1

"vmstat" shows you the free memory. Or you install SMCtop from sunfreeware.com which brings you the familiar "top" command.

Thank you!!!

Please note it is common for CPUs here (in prtdiag) to be cores/strands.

I'm not sure if it's made it into Solaris 10 yet, but Open Solaris has "lgrpinfo", which gives not only the number of CPUs and memory but also a lot of information regarding their configuration, which can be important on a NUMA host.

This command give the number of virtuals CPUs (can be larger than the number of chips with multi-core/threads):

psrinfo

That one is the usual answer and works with system lacking prtdiag:

prtconf | grep Memory

The closer would be

echo ::memstat|mdb -k

, as root.

Memory or Disk size info can be got using

iostat -E | grep Size

This command should list the no. of hard disks and their capacity