CPU or MB Serial number

B

Bayazee

Hi,
How can I get CPU Serial number , or motherboard serial number with
python . I need an idetification of a computer ....
ThanX
 
S

Sybren Stuvel

Bayazee enlightened us with:
How can I get CPU Serial number , or motherboard serial number with
python . I need an idetification of a computer ....

Not sure if that'll be sufficient. My serial numbers (according to
'lshw' on Linux):

System:
description: Tower Computer
product: System Name
vendor: System Manufacturer
version: System Version
serial: SYS-1234567890

Motherboard:
product: A7V8X
vendor: ASUSTeK Computer INC.
physical id: 0
version: REV 1.xx
serial: xxxxxxxxxxx

CPU:
product: AMD Athlon(TM) XP 2000+
vendor: Advanced Micro Devices [AMD]
physical id: 4
bus info: cpu@0

So even if you can read those numbers, they aren't guaranteed to be
unique, hence not usable as identification.

Sybren
 
M

marc.wyburn

Bayazee said:
Hi,
How can I get CPU Serial number , or motherboard serial number with
python . I need an idetification of a computer ....
ThanX

If you are on a windows box with WMI (2000 or above) you can use
Python, win32com extentions to get it. The WMI stuff is easily
accessible with Tim Goldens wrapper
http://tgolden.sc.sabren.com/python/wmi.html
.... print s
....

instance of Win32_Processor
{
AddressWidth = 32;
Architecture = 0;
Availability = 3;
Caption = "x86 Family 15 Model 2 Stepping 4";
CpuStatus = 1;
CreationClassName = "Win32_Processor";
CurrentClockSpeed = 1794;
CurrentVoltage = 15;
DataWidth = 32;
Description = "x86 Family 15 Model 2 Stepping 4";
DeviceID = "CPU0";
ExtClock = 100;
Family = 2;
L2CacheSize = 0;
Level = 15;
LoadPercentage = 7;
Manufacturer = "GenuineIntel";
MaxClockSpeed = 1794;
Name = " Intel(R) Pentium(R) 4 CPU 1.80GHz";
PowerManagementSupported = FALSE;
ProcessorId = "3FEBFBFF00000F24";
ProcessorType = 3;
Revision = 516;
Role = "CPU";
SocketDesignation = "Microprocessor";
Status = "OK";
StatusInfo = 3;
Stepping = "4";
SystemCreationClassName = "Win32_ComputerSystem";
SystemName = "LON42";
UpgradeMethod = 4;
Version = "Model 2, Stepping 4";
};
 
L

Lawrence D'Oliveiro

Sybren Stuvel said:
Bayazee enlightened us with:

Not sure if that'll be sufficient. My serial numbers (according to
'lshw' on Linux):

Hey, that's pretty cool, I didn't know about lshw before. It doesn't
come with my SuSE 10.0 system, but it is available under Gentoo.

I tried on my Shuttle SN25P box, and it didn't report serial numbers for
anything except the onboard Ethernet.

In general, the OP isn't going to get anything like a universally-usable
serial number, apart from Ethernet MAC addresses.

By the way, lshw seems to think there's a second CPU on my box, but it's
marked as "DISABLED" and has no capabilities. Is it really there, or
just a figment of someone's imagination? :)
 
S

Sybren Stuvel

Lawrence D'Oliveiro enlightened us with:
In general, the OP isn't going to get anything like a
universally-usable serial number, apart from Ethernet MAC addresses.

And still, those can be changed too. Besides, that's an ID for the
ethernet card, unique within its subnet - not an ID for the computer
itself.
By the way, lshw seems to think there's a second CPU on my box, but
it's marked as "DISABLED" and has no capabilities. Is it really
there, or just a figment of someone's imagination? :)

I guess it's just a figment of someone's imagination :)

Sybren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top