Solved

CPU AND CORES

Posted on 2012-04-02
14
647 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Power and BTU ratings calculation 13 73
Refurbished 16 75
URL for downloading Google Chrome for Win XP 2 157
Windows Not Displaying Monitor when attached to Internal Graphics Card 25 115
Learn about cloud computing and its benefits for small business owners.
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…
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

777 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