Re: Finding CPU stats on Win? - Programmer

This is a discussion on Re: Finding CPU stats on Win? - Programmer ; guice666 wrote > Nice, now I just gotta find out if there's a way to read if a CPU has > Hyperthreading enabled or not (or if it's possible). > > I searched for Hyperthread on the MS Library site ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Finding CPU stats on Win?

  1. Re: Finding CPU stats on Win?

    guice666 wrote
    > Nice, now I just gotta find out if there's a way to read if a CPU has
    > Hyperthreading enabled or not (or if it's possible).
    >
    > I searched for Hyperthread on the MS Library site and came back with
    > zero results. Know where I might need to look to find this out?


    I'm not sure if there's a reasonably simple way at all to query
    that information. I don't have a HT system here,
    but maybe if you toy around with the different WMI classes
    (Win32_Processor's SocketDesignation parameter, the
    Win32_ComputerSystem and Win32_ComputerSystemProcessor
    classes) you can find something. Maybe the cpucount tool
    from intel could also be of some help for you, but if I recall
    correctly it's just available as a binary. If not, you will most
    probalby have to go the hard way, reading out cpuid using
    some inlined C or assembler code and comparing the appropriate
    bit value in EBX.

    But now the whole thing is getting away from perl quite fast,
    so I'm setting an X-Post and FollowUp to
    comp.os.ms-windows.programmer.misc.

    -Chris

  2. Re: Finding CPU stats on Win?


    Christian Winter wrote:
    > guice666 wrote
    > > Nice, now I just gotta find out if there's a way to read if a CPU

    has
    > > Hyperthreading enabled or not (or if it's possible).
    > >
    > > I searched for Hyperthread on the MS Library site and came back

    with
    > > zero results. Know where I might need to look to find this out?

    >
    > I'm not sure if there's a reasonably simple way at all to query
    > that information. I don't have a HT system here,
    > but maybe if you toy around with the different WMI classes
    > (Win32_Processor's SocketDesignation parameter, the
    > Win32_ComputerSystem and Win32_ComputerSystemProcessor
    > classes) you can find something. Maybe the cpucount tool
    > from intel could also be of some help for you, but if I recall
    > correctly it's just available as a binary. If not, you will most
    > probalby have to go the hard way, reading out cpuid using
    > some inlined C or assembler code and comparing the appropriate
    > bit value in EBX.
    >
    > But now the whole thing is getting away from perl quite fast,
    > so I'm setting an X-Post and FollowUp to
    > comp.os.ms-windows.programmer.misc.
    >
    > -Chris


    That's what I was afraid of. I do have a small C++ program I got from
    our windows guy that does this and it definatly uses assembly to query
    for HT capabilities.

    I've taken a look through a few things within the WMI libraries, but
    hadn't had any luck yet. I'll check the additional places you've
    suggested, but as you said I might have to rely on some C/C++ program
    for this. As you've stated earlier, everything's in binary and due to
    my place of work, we have to compile it inhouse or we can't use it.
    (things get 10x harder when they don't supply us with compilers either,
    ugh.)

    philip


+ Reply to Thread