OPNsense is based on FreeBSD so these are essentially ways to get hardware info on FreeBSD
CPU¶
sysctl hw.model
sysctl hw.ncpu
sysctl hw.clockrate
Memory¶
echo $(( $(sysctl -n hw.physmem) / 1024 / 1024 / 1024 )) GB
Dmidecode¶
pkg install dmidecode
sudo dmidecode -t memory