CPU or MB Serial number

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bayazee

    #1

    CPU or MB Serial number

    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

  • marc.wyburn@googlemail.com

    #2
    Re: CPU or MB Serial number


    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

    >>import wmi
    >>c = wmi.WMI()
    >>for s in c.Win32_Process or():
    .... print s
    ....

    instance of Win32_Processor
    {
    AddressWidth = 32;
    Architecture = 0;
    Availability = 3;
    Caption = "x86 Family 15 Model 2 Stepping 4";
    CpuStatus = 1;
    CreationClassNa me = "Win32_Processo r";
    CurrentClockSpe ed = 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 = "GenuineInt el";
    MaxClockSpeed = 1794;
    Name = " Intel(R) Pentium(R) 4 CPU 1.80GHz";
    PowerManagement Supported = FALSE;
    ProcessorId = "3FEBFBFF00000F 24";
    ProcessorType = 3;
    Revision = 516;
    Role = "CPU";
    SocketDesignati on = "Microprocessor ";
    Status = "OK";
    StatusInfo = 3;
    Stepping = "4";
    SystemCreationC lassName = "Win32_Computer System";
    SystemName = "LON42";
    UpgradeMethod = 4;
    Version = "Model 2, Stepping 4";
    };

    Comment

    • Bayazee

      #3
      Re: CPU or MB Serial number

      ThanX for your clear answer !
      but what we can do in linux ?

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

      Comment

      • Lawrence D'Oliveiro

        #4
        Re: CPU or MB Serial number

        In article <slrneb77ra.98j .sybrenUSE@schu imige.stuvel.eu >,
        Sybren Stuvel <sybrenUSE@YOUR thirdtower.com. imaginationwrot e:
        >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? :)

        Comment

        Working...