How do I view my hardware specs in my unix machine ?

I am trying to view the hardware specifications through ssh

My O/S

Type top, you will get somthing like:
Look at the bold lines, you can see that on that machine u have 2G mem and 4 CPU

20:43:35 up 8 days, 22:32, 1 user, load average: 0.00, 0.00, 0.00
65 processes: 64 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 0.0% 0.0% 0.0% 0.0% 0.0% 0.6% 99.2%
cpu00 0.0% 0.0% 0.0% 0.0% 0.0% 0.4% 99.5%
cpu01 0.0% 0.0% 0.0% 0.0% 0.0% 0.4% 99.5%
cpu02 0.0% 0.0% 0.0% 0.0% 0.2% 1.0% 98.7%
cpu03 0.0% 0.0% 0.0% 0.0% 0.0% 0.8% 99.1%
Mem: 2055456k av, 2036544k used, 18912k free, 0k shrd, 304372k buff
1440116k actv, 273280k in_d, 34012k in_c
Swap: 4194216k av, 0k used, 4194216k free 1454584k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
1 root 15 0 512 512 448 S 0.0 0.0 0:08 1 init
2 root RT 0 0 0 0 SW 0.0 0.0 0:00 0 migration/0
3 root RT 0 0 0 0 SW 0.0 0.0 0:00 1 migration/1
4 root RT 0 0 0 0 SW 0.0 0.0 0:00 2 migration/2

Normally on Linux using dmesg command you can find information regarding the no.of cpus, memory, processor speed.

try if it works.. not sure of FreeBSD

/usr/platform/$ ( uname -i ) /sbin/prtdiag -v

or /usr/platform/`uname -i`/sbin/prtdiag -v