(10 July 2012)
A simple script I wrote back in 1998 to identify some of the hardware in a (SPARC-based) Sun:
#!/bin/ksh/usr/sbin/prtconf | head -2
uname -a
dmesg | grep "oot nexus" | uniq
dmesg | egrep "^cpu.:" | sort | uniq
dmesg | egrep "^mem.=" | uniq
eg:
root@sol10 # ./suntype
System Configuration: Oracle Corporation sun4u
Memory size: 2560 Megabytes
SunOS sol10 5.10 Generic_147440-01 sun4u sparc SUNW,Sun-Fire-V240
Naturally if your dmesg has filled up with noise since boot, you won't get anything out of it.