By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,536 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,536 IT Pros & Developers. It's quick & easy.

CPU or MB Serial number

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

---------------------------------------------------
iranian python community --www.python.ir

Jul 11 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

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

---------------------------------------------------
iranian python community --www.python.ir
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
>>import wmi
c = wmi.WMI()
for s in c.Win32_Processor():
.... 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";
};

Jul 11 '06 #2

P: n/a
ThanX for your clear answer !
but what we can do in linux ?

-------------------------------------------------
first iranian python community --www.python.ir

Jul 11 '06 #3

P: n/a
In article <sl**********************@schuimige.stuvel.eu>,
Sybren Stuvel <sy*******@YOURthirdtower.com.imaginationwrote:
>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):
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? :)
Jul 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.