Cpu.GroupID Property


Gets the current value of the T:Microsoft.SqlServer.Management.Smo.Cpu.GroupID member.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public int GroupID { get; }

Property Value

Type: System.Int32

Returns the GroupID that is assigned to this Cpu object.

CPUs in a computer system are arranged into groups. Each group is identified by a GroupID that is assigned by the computer hardware.

The following code example shows how to display the GroupID for each CPU on the local instance of SQL Server.


using System;
using Microsoft.SqlServer.Management.Smo;

namespace samples
    class Program
        static void Main(string[] args)
            Server dbServer = new Server("(local)");
            foreach (Cpu cpu in dbServer.AffinityInfo.Cpus)
                Console.WriteLine("CPU ID {0} is {1}.",
                    cpu.ID, cpu.GroupID);


$dbServer = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
Foreach ($cpu in $dbServer.AffinityInfo.Cpus)
   Write-Host "CPU ID:" $cpu.ID "is" $cpu.GroupID

Return to top