?
Solved

CPU AND CORES

Posted on 2012-04-02
14
Medium Priority
?
681 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 57

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
 
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 1180 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
On Beyond Tools A conversation I recently had with the DevOps manager of a major online retailer really made me think about DevOps monitoring tools (https://www.onpage.com/devops-incident-management-tool/). The manager and I discussed how sever…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…
Suggested Courses

830 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