If you need to determine the amount of memory in a Solaris system, you can use the
prtconfcommand. The second line of output will show the amount of memory in the system.
# prtconf System Configuration: Sun Microsystems sun4u Memory size: 384 Megabytes System Peripherals (Software Nodes): SUNW,Ultra-5_10 ...
Or you can use
prtconf | grep Memory to get just the amount of
memory in the system.
If you need to determine the disk space in the system you can use this soldiskspace BASH script to display the disk space in GigaBytes (GB). You may need to modify the first line in the script to point to the actual location of bash on your system, e.g. /usr/local/bin/bash on Solaris 2.7 systems. The script uses the prtvtoc command and is based on the BASH script provided by Sandra Henry-Stocker, ITworld.com in an article titled Calculating overall disk space published on December 23, 2004 on ITworld.com . A full explanation of how the script works is available in the article.
The script must be run as root. To use the script, issue
chmod 700 soldiskspace to make the script executable.
# ./soldiskspace Disks: /dev/rdsk/c0t0d0s2: 8 Gbytes TOTAL: 8 GB
Zip file for script: soldiskspace.zip
An alternative method of determing the disk space on a system is to use
iostat -En. Using that command on the same system as used in
the example above shows the disk space in the second line of output below.
The command also shows the manufacturer and model number for the CD-ROM
drive in the system. The size value should be ignored for the CD-ROM drive.
# iostat -En c0t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 : Size: 8.62GB <8622415872 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 0 c0t2d0 Soft Errors: 0 Hard Errors: 52 Transport Errors: 0 Vendor: LG Product: CD-ROM CRD-8322B Revision: 1.05 Serial No: ºÝþºÝþºÝþ Size: 18446744073.71GB <-1 bytes> Media Error: 0 Device Not Ready: 52 No Device: 0 Recoverable: 0 Illegal Request: 0 Predictive Failure Analysis: 0