Właściwość Cpu.NumaNodeID
Pobiera NumaNodeID węzeł NUMA, do której ta Cpu należy obiekt.
Przestrzeń nazw: Microsoft.SqlServer.Management.Smo
Zestaw: Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)
Składnia
'Deklaracja
Public ReadOnly Property NumaNodeID As Integer
Get
'Użycie
Dim instance As Cpu
Dim value As Integer
value = instance.NumaNodeID
public int NumaNodeID { get; }
public:
property int NumaNodeID {
int get ();
}
member NumaNodeID : int
function get NumaNodeID () : int
Wartość właściwości
Typ: System.Int32
Int Wartości przypisane do Procesora, reprezentowane przez to Cpuwystąpienie.
Uwagi
NumaNodeIDelement członkowski Jest tylko do odczytu.
Przykłady
Poniższy przykład kodu pokazuje sposób wyświetlania NumaNodeID dla każdego Procesora w lokalne wystąpienie SQL Server.
using System;
using Microsoft.SqlServer.Management.Smo;
namespace samples
{
class Program
{
static void Main(string[] args)
{
Server dbServer = new Server("local");
dbServer.Refresh();
foreach (Cpu cpu in dbServer.AffinityInfo.Cpus)
{
Console.WriteLine("The NumaNodeID for CPU ID {0} is {1}.",
cpu.ID, cpu.NumaNodeID);
}
}
}
}
PowerShell
$dbServer = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$dbServer.Refresh()
Foreach ($cpu in $dbServer.AffinityInfo.Cpus)
{
Write-Host "The NumaNodeID for CPU ID" $cpu.ID "is" $cpu.NumaNodeID"."
}