How i can get CPU ID.
the OS i use is Fedora 10.
Printable View
How i can get CPU ID.
the OS i use is Fedora 10.
CPUid is an optional module in the linux kernel.
http://manpages.courier-mta.org/htmlman4/cpuid.4.html
If you are looking for the Unique processor serial number then this was removed after pentium 3 (Human rights protestors forced intel to remove it on privacy grounds).
Regards
thanks for the link.
but i need a solution that i can implement it with both java code and c++.
in my java code i use aspect and i can not invoke c++ dll when i use aspect. so i should write code both in java and c++ that both of them generate same CPU ID or something realted to CPU ID that is unique.
please help me.
Thats exactly what you can't do. Any two processors of the same model will have the same CPUID (unless they're pentium III).
According to Wikipedia (http://en.wikipedia.org/wiki/CPUID#E..._Serial_Number):
On the off chance that you know the processors you're going to run your code on will support this feature, then you could used the suggested drivers in linux and access the /proc/cpuid file from both java and c++.Quote:
The processor serial number was introduced on Intel Pentium III, but due to privacy concern, this feature is no longer implemented on later models (PSN feature bit is always cleared). Transmeta's Efficeon and Crusoe processors also provide this feature. AMD CPUs however, do not implement this feature in any CPU models.
Alternative
If you're trying to uniquely identify a computer, you're more likely to be able to do so by taking the hard disk serial number (to avoid ambiguity, try to locate the hard disk containing the root partition). I've never done this myself so Google is your friend here.
Hope this is of some help