CPU or MB Serial number

Discussion in 'Python' started by Bayazee, Jul 11, 2006.

  1. Bayazee

    Bayazee Guest

    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
     
    Bayazee, Jul 11, 2006
    #1
    1. Advertising

  2. 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
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa
     
    Sybren Stuvel, Jul 11, 2006
    #2
    1. Advertising

  3. Bayazee

    Guest

    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, 2006
    #3
  4. Bayazee

    Bayazee Guest

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

    -------------------------------------------------
    first iranian python community --> www.python.ir
     
    Bayazee, Jul 11, 2006
    #4
  5. In article <>,
    Sybren Stuvel <> wrote:

    >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? :)
     
    Lawrence D'Oliveiro, Jul 15, 2006
    #5
  6. 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
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa
     
    Sybren Stuvel, Jul 15, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg Pedder
    Replies:
    0
    Views:
    688
    Greg Pedder
    Feb 8, 2004
  2. Leonardo Custodio

    CPU Serial Number

    Leonardo Custodio, Nov 1, 2003, in forum: C Programming
    Replies:
    5
    Views:
    1,771
    John Swanson
    Nov 2, 2003
  3. CPU or MB Serial number

    , Jul 14, 2006, in forum: C Programming
    Replies:
    3
    Views:
    431
    Walter Roberson
    Jul 14, 2006
  4. pavunkumar

    How , system cpu and user cpu times calculates

    pavunkumar, Feb 27, 2009, in forum: C Programming
    Replies:
    1
    Views:
    360
  5. jis
    Replies:
    4
    Views:
    160
Loading...

Share This Page