Powershell command for getting info about cores per node

Answered Powershell command for getting info about cores per node

  • Tuesday, January 12, 2010 9:20 PM
     
     
    We have a Windows cluster here at work and I have been tasked with tracking its usage. Management wants to know how many cores I have on each of my nodes as well as how many cores are in use by a node when a given job is submitted. Does anyone know the Powershell commands associated with obtaining the number of cores per machine as well as the number of cores in use by a node?

    I've tried sever things but can't seem to get the right thing. The last command I tried was:
    $m = get-wmiobject Win32_ComputerSystem -computer node_1
    $m.NumberOfProcessors

    This returns a value of 2 but I know that node_1 has 4 CPU on it.

    Pat

All Replies

  • Tuesday, January 12, 2010 11:29 PM
    Moderator
     
     
    I'll search, but from what I remember, some improvements were done to WMI to provide better support for showing information on cores...

    I'll look around, but think it was with Vista+

    What OSs are you querying?
  • Tuesday, January 12, 2010 11:35 PM
    Moderator
     
     
    Some more info:
    http://support.microsoft.com/kb/952978
    http://www.sql-server-pro.com/physical-cpu-count.html

    Not exactly the article I seem to remember seeing ages ago, but I'll keep searching when I have spare time.
  • Wednesday, January 13, 2010 1:21 AM
     
     
    Its Windows Server 2008
  • Wednesday, January 13, 2010 1:24 AM
    Moderator
     
     Answered
    Have you tried this other property:

    PS > get-wmiobject Win32_ComputerSystem|format-list *proc*


    NumberOfLogicalProcessors : 2
    NumberOfProcessors        : 1

    I have one physical with two cores...
  • Wednesday, January 13, 2010 8:05 AM
     
     
    please, show us the result of this command:
    @(gwmi win32_processor -computer node_1).count
    http://www.sysadmins.lv