You need to go to the CPU vendor site probably and lookup there API's and Developer tools. What you want access to is most likely vendor specific, also most ppl have this option turned off by default so you will only be able to see your own serial number and you have to turn on this capability.

To turn it on you need to, when you computer starts up, after the mem test in black screen mode and before Windows or whatever your OS is starts up press either "DEL" key or "F8" or usually it will tell you. This will take you to the DOS-style setup for your hardware/motherboard. Under one of the sections there is a selection for the serial number of your CPU, you need to enable this, save & exit.

If your using windows it might give you the capability of obtaining the Serial once it's enabled so you don't have to search through vendor sites to find what your looking for. It would be in the system information in your device manager, you need to lookup how to access this information progmatically from windows development site: