Thanks a lot Nitin.....This worked....to be very specific..it is

For SunSolaris

/usr/sbin/prtconf | grep Mem

O/P: Memory size: 12288 Megabytes