Hello
My employer has ESXi 5.0 and ESXi 5.1 hosts that run one or more VMs. Some of the VMs are running a very CPU heavy application. The task is to gather real-time data (data points 20 or less seconds apart) of the CPU usage from the Host and all VMs so that it can be stored in a SQL database (my task ends here) and analyzed on the fly. Basically this is an optimization task, the CPU heavy applications will run more or less threads to fully use the host's resources without making other VMs lack what they need.
What would be the best (or the easiest) way to do this?
Could I use the Get-Stat from PowerCLI to save a single data point (I believe this data updates every 20 seconds) of host/VMs CPU usage to a SQL database and how would I do this? (This post made me wonder: http://communities.vmware.com/message/1784833#1784833)
Can the CPU usage data, that is gathered by vSphere (and accessed using Get-Stat, I believe), be streamed to a SQL database, how to access this data, the database it's stored or how to direct part of it to a specific file?
Currently I'm trying to do this using esxtop, I can limit the data to CPU only by making a config file in interactive mode, I can limit the data to the host and VMs by exporting, editing and importing the entities file and run batch mode with these files to save the result (one data point) to a file. I also have a simple script in awk that reads this file and makes a new one that is ready for the SQL database.
I think that this method can give me more data points, but it requires that I manually edit the entity file and the script for each Host/VMs combination.
Thank you for reading. Please post suggestions.
Regards
Genoan