Better linux hardware strings

So I was looking for better hardware descriptions.
On some platforms, this gives good output:
extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
extend manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'

But others do not.

I repurposed a script to get some nicer output:

/usr/bin/awk -F": " '/^model name/ { mod=$2 } /^cpu MHz/ { mhz=$2 } /^cpu core/ {core=$2} /^flags/ { virt="No Virtualisation";match($0,"svm");if (RSTART!=0) { virt="SVM-Virtualisation" };match($0,"vmx");if (RSTART!=0) { virt="VMX-Virtualisation" } } /^Mem:/ {split($2,arr," ");tot=arr[1];free=arr[2]} END { printf "%s %s core(s) %s %sB Memory\n",mod,core,virt,tot }' /proc/cpuinfo <(/usr/bin/free -mh)

then make it executable and set this in your snmpd.conf
extend hardware /etc/snmp/hardware

Giving a much nicer output. Feel free to tweak. Try to avoid something that will change often, otherwise it will pollute your eventlog.