HPC Server 2008 Heat Map Resuscitation: Now with more Vitamins
In a previous post, I cranked up a script using PowerShell and psexec to fix the heat map problems that may happen with Windows HPC Server 2008. The script waited for each node to complete, which could take hours to perform if your cluster is big.
In order to solve this problem, I upgraded the head node’s PowerShell to v2.0 (HPC Server ships with PowerShell 1.0) and was now able to use the Start-Process process. This leads to having the script run in no time at all. Here is the code:
#Uncomment line below if running from a regular PowerShell Window
#Add-PSSnapin "Microsoft.HPC"
#Change the HPC-HN value below to match the name of your head node
$HEAD_NODE = "HPC-HN"
#Obtain Compute Nodes
$nodes = Get-HpcNode -GroupName ComputeNodes
Write-Host "Setting Head Node To:" $HEAD_NODE
Set-Content Env:CCP_SCHEDULER $HEAD_NODE
#Stop Head Node Services
Stop-Service -Force HpcManagement
Stop-Service -Force HpcNodeManager
Stop-Service -Force HpcSdm
$services = "HpcManagement", "HpcNodeManager"
#Stop the services on all compute nodes
foreach ($node in $nodes) {
foreach ($service in $services) {
$serviceStop = "net stop $service"
$computer = $node.NetBiosName
$computer = "\\$computer"
Write-Host ("Executing command: psexec " + $computer + " " + $serviceStop)
Start-Process psexec -args ($computer + " " + $serviceStop)
}
}
Write-Host("Waiting 10 seconds for services to stop")
#Change the value below if you have a large number of nodes
Sleep(10)
foreach ($node in $nodes) {
foreach ($service in $services) {
$serviceStart = "net start $service"
$computer = $node.NetBiosName
$computer = "\\$computer"
Write-Host ("Executing command: psexec " + $computer + " " + $serviceStart)
Start-Process psexec -args ($computer + " " + $serviceStart)
}
}
Write-Host("Waiting 20 seconds for services to start")
#Change the value below if you have a large number of nodes
Sleep(20)
#Start Services on Head Node
Start-Service HpcManagement
Start-Service HpcNodeManager
Start-Service HpcSdm
Write-Host("Your nodes should show up in the heat map in a about a minute")
And of course, we need to have a video. Here is the script in action with 4 nodes that are not displaying their info on the heat map:

June 5th, 2010 at 4:29 pm
[...] If you would like a faster version and you are willing to upgrade your head-node to v2, check this post [...]