I'm trying to get the CPU serial
or motherboard serial
using C
or Python
for licensing purposes. Is it possible?
I'm using Linux
.
I'm trying to get the CPU serial
or motherboard serial
using C
or Python
for licensing purposes. Is it possible?
I'm using Linux
.
CPUs no longer obtain a serial number and it's been like that for a while now. For the CPUID - it's unique per CPU model therefore it doesn't help with licensing.
You can get the CPUID. Maybe linux command 'dmidecode' can help you. You can exec this command,or load the source code of "dmidecode". Next is the output of "dmidecode -t processor":
You need to use the CPUID instruction.
CPUID
Most C compilers have some support for inline assembly, but you will need to know what you are doing.
In Linux, motherboard information may be found under /sys/class/dmi eg
...but not all motherboards provide serial number through dmi...as you can see here.
Under Linux, you could use "lshw -quiet -xml" and parse its output. You'll find plenty of system information here: cpuid, motherboard id and much more.