?
Solved

CPU AND CORES

Posted on 2012-04-02
14
Medium Priority
?
670 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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 56

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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
New style of hardware planning for Microsoft Exchange server.
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…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

762 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