works on intel platforms with bios, won't probably on arm, as this is finding and decoding a "bios" table.
Some handy commands:
sudo dmidecode|grep Vendor
sudo dmidecode -t system|grep Product
sudo dmidecode |grep "Serial Number" |head -n1 (only works on assumption the system s/n is first)
sudo dmidecode|grep CPU (might give a lot of extra crap on vmware, which has 32 sockets)
sudo dmidecode|grep RAID shows raid controller if configureed