VMware Cloud Community
TomBrady5Rings
Contributor
Contributor

Script to find least utilized host

Is there a script that somebody has written that finds the least utilized host in a cluster? Maybe one that just looks at CPU/MEM usage of the hosts and outputs the last used?

0 Kudos
1 Reply
KRAEMS
Enthusiast
Enthusiast

Hi Tom,

I inherited some code for an action that does something similar (returns best host given an input of datacenter).  Take a look at the post in this forum named "Orchestrator 7.2 to 7.3 upgrade breaks some scripting" originally posted May 23rd, last updated June 1st. The following may also provide some context:

javascript - Finding the max value of an attribute in an array of objects - Stack Overflow http://stackoverflow.com/questions/4020796/finding-the-max-value-of-an-attribute-in-an-array-of-obje...

KRAEMS

0 Kudos