Monitoring the netGP Heap En-Masse
As a quick followup to my note around the Full netGP Heap Issue, we've found ourselves in need of a way to easily monitor the netGP status across many hosts in the environment while we await the patch that fixes the issue. I've searched high and low for a way to access vsish or the netGP Heap stats from PowerCLI but haven't had any luck. So, I've put together a quick and dirty solution... but it gets the job done.
All that I've done here is put together a quick PowerCLI script that generates a Shell Script (just redirect the output to a file). That Shell Script can then be executed from one of your ESXi servers (ensure that SSH is enabled!) in order to pull information from all of the servers in your environment.
You'll need to type in your root password for every host in your environment (unless you want to do something crazy), although you can keep it on your clipboard and just right click in your PuTTY window to paste it (protip: when copying the password to your clipboard, put a carriage return after the password to save an extra keystroke!).
All that I've done here is put together a quick PowerCLI script that generates a Shell Script (just redirect the output to a file). That Shell Script can then be executed from one of your ESXi servers (ensure that SSH is enabled!) in order to pull information from all of the servers in your environment.
$AllHosts = Get-VMHost
foreach ($ThisHost in $AllHosts)
{
write-output "echo Host $ThisHost"
write-output "ssh $ThisHost 'vsish -e cat /system/heaps/netGPHeap-0x4100013cc000/stats' | grep 'percent free of max size'"
}
You'll need to type in your root password for every host in your environment (unless you want to do something crazy), although you can keep it on your clipboard and just right click in your PuTTY window to paste it (protip: when copying the password to your clipboard, put a carriage return after the password to save an extra keystroke!).
Comments
Post a Comment
Sorry guys, I've been getting a lot of spam recently, so I've had to turn on comment moderation. I'll do my best to moderate them swiftly after they're submitted,