Getting the List of Nodes in the Cluster
The following example shows how to list the compute nodes of a cluster and get information about them, such as the amount of memory and number of processors.
public static IClusterEnumerable clusterNodes;
private void LoadComputeNodesList()
{
if (null == clusterNodes)
clusterNodes = cluster.ComputeNodes;
foreach (INode node in clusterNodes)
{
ListViewItem lvi = new ListViewItem(new string[] {
node.Name,
node.Status.ToString(),
String.Format("{0} GB", node.Memory / 1000),
node.NumberOfProcessors.ToString(),
String.Format("{0:F1} GHz", node.ProcessorSpeed / 1000.0)
});
lvi.Tag = node.Status;
listComputeNodes.Items.Add(lvi);
}
}
Related topics
Show: