Solved

CPU AND CORES

Posted on 2012-04-02
14
657 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
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
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 54

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
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…

726 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