Solved

CPU AND CORES

Posted on 2012-04-02
14
639 Views
Last Modified: 2012-04-03
Hi
There is anytool that scan the servers in the network, and can tell me how much cpu and cores include Hyper-threading  have to the servers?

if not.
there is a manual way to find out how much cpu and cores include Hyper-threading in each server?

Tanks in advanced.
0
Comment
Question by:Senx
14 Comments
 
LVL 14

Expert Comment

by:athomsfere
ID: 37796092
You could do it with Powershell.

Make a list of servers and put it in a txt file, then do a foreach machine in list, run a WMI query to find Physical Cores, Logical cores, and number of Processors and then write that back out to a CSV perhaps.
0
 

Author Comment

by:Senx
ID: 37796111
Thanks
but i really dont know how to run the query
i have the list of servers

lets take an example:
i have a server that call "vc"
what the Procedure to run the query to "vc" server?

thanks in advanced
0
 
LVL 14

Expert Comment

by:Tribus
ID: 37796171
0
 
LVL 14

Expert Comment

by:athomsfere
ID: 37796406
Just for you to get  a basic feel for one way you could do this, this just writes out to the console.

$MachineToCheck = "YourPC"

$ComputerProc = Get-WmiObject -Namespace "root\CIMV2" -Class Win32_ComputerSystem -ComputerName $MachineToCheck 
$NumCores = Get-WmiObject -Namespace "root\CIMV2" -Class Win32_Processor -ComputerName $MachineToCheck 

Write-Output $ComputerProc.Caption
Write-Output $ComputerProc.NumberOfProcessors
Write-Output $ComputerProc.NumberOfLogicalProcessors
Write-Output $NumCores.NumberOfCores

Open in new window

0
 

Author Comment

by:Senx
ID: 37796691
"Just for you to get  a basic feel for one way you could do this, this just writes out to the console.

"

Sorry but from which  console did you mean?

THE WMIC console?

If yes thats not working. i repleaced only the "my computer" parameter
with my computer name

i get "alias not found"
0
 
LVL 14

Expert Comment

by:athomsfere
ID: 37797064
Thats a Powershell script, you can write that to a .PS1 or a in the Powershell ISE and run it, and it will print that data to the Powershell console.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 37798807
The easiest way I see is psinfo, part of the pstools suite (a freeware from Microsoft).
Psinfo.exe |findstr Processors

Open in new window

returns something like
Processors:                4

It can be used against a list of computers, see psinfo /?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
ID: 37799482
If you still struggle try "http://www.spiceworks.com" their software is free and it will scan your network as long as you set it up correct with proper admin rights, then it will display pretty much all your devices if you provided correct credentials.
0
 

Author Comment

by:Senx
ID: 37799704
Thanks
let me rephrase what i need please.
i need to know how much socket/cores and if Hyper-threading activate on the server.

$MachineToCheck = "YourPC"

$ComputerProc = Get-WmiObject -Namespace "root\CIMV2" -Class Win32_ComputerSystem -ComputerName $MachineToCheck
$NumCores = Get-WmiObject -Namespace "root\CIMV2" -Class Win32_Processor -ComputerName $MachineToCheck

Write-Output $ComputerProc.Caption
Write-Output $ComputerProc.NumberOfProcessors
Write-Output $ComputerProc.NumberOfLogicalProcessors
Write-Output $NumCores.NumberOfCores
                                     
this query is useful but there is anyway to know if Hyper-threading  activated?
0
 
LVL 14

Expert Comment

by:athomsfere
ID: 37800390
There is nothing in WMI that I am aware of that that can return a boolean on whether there is Hyper Threading, but you can figure out pretty easy.

For example, on a CPU with hyperthreading, Say 2 cores with Hyperthreading it will see NumberOfCores as 4, and numberOfLogicalProcessors as 2.

So you can simply compare the 2.

Something like: (Not at my PS PC right now).

if ($ComputerProc.NumberOfProcessors -lt $ComputerProc.NumberOfLogicalProcessors)
      {
            $HTEnabled = "Hyperthreading Enabled"
      }
else
      {  
            $HTEnabled = "False"
      }

Open in new window

0
 
LVL 14

Accepted Solution

by:
athomsfere earned 295 total points
ID: 37801117
OK, the above didn't do what I meant it to.

You can plug this entire script in to see what it does.

$MachineToCheck = "ckan0w01afrenc2"

$ComputerProc = Get-WmiObject -Namespace "root\CIMV2" -Class Win32_ComputerSystem -ComputerName $MachineToCheck
$NumCores = Get-WmiObject -Namespace "root\CIMV2" -Class Win32_Processor -ComputerName $MachineToCheck

Write-Output $ComputerProc.Caption
Write-Output $ComputerProc.NumberOfProcessors
Write-Output $ComputerProc.NumberOfLogicalProcessors
Write-Output $NumCores.NumberOfCores

if ($ComputerProc.NumberOfLogicalProcessors -le $ComputerProc.NumberOfCores)
      {
            $HTEnabled = "No Hyperthreading"
      }
else
      {  
            $HTEnabled = "Hyperthreading Enabled"
      }
	  
	Write-Output $HTEnabled

Open in new window

0
 

Author Comment

by:Senx
ID: 37801160
i take this script into the power shell console?
the output is like this:

PS C:\> Write-Output $ComputerProc.Caption
IT21226
PS C:\> Write-Output $ComputerProc.NumberOfProcessors
1
PS C:\> Write-Output $ComputerProc.NumberOfLogicalProcessors
4
PS C:\> Write-Output $NumCores.NumberOfCores
4



what about this line about Hyperthreading?
PS C:\>
PS C:\> if ($ComputerProc.NumberOfLogicalProcessors -le $ComputerProc.NumberOfCores)
>>       {
>>             $HTEnabled = "No Hyperthreading"
>>       }
>> else
>>       {
>>             $HTEnabled = "Hyperthreading Enabled"
>>       }

no output avaliable.
0
 
LVL 14

Expert Comment

by:athomsfere
ID: 37801302
Are you plugging this into your ISE or into a PS1?

When run, it should look something like this:

Sample Output
0
 

Author Comment

by:Senx
ID: 37801514
yes thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now