VMware Cloud Community
jroc151
Contributor
Contributor
Jump to solution

PowerCLI script help

I am new to PowerCLI and was hoping to get some assistance with a report I am trying to generate.  Ive found various scripts and was able to put something together using existing scripts I found on the Internet, which I've tweaked a bit (see attached) to get me close to what i am looking for for but not quite there yet.  I have a list of VMs that I want to use to produce a report, showing a line per VM per day for the past 7 days each showing VM's utilization (peak memory, peak CPU and the 95th percentile) in percentage as well as MHz  for CPU and MB for memory.


Any assistance with this is greatly appreciated.  Thank you in advance!

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Your script is already grouping the results per VM.

You can easily add a 2nd property to group by.

That would be Day in your case if I understand your question correctly?

Your scrip is looking at the averages and it finds the maximum average value.

Is that what you mean by 'peak' CPU and memory?

The 95th percentile is just a calculation you perform on the data for 1 day.

There are many examples available, see for example A percentile function for PowerShell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Your script is already grouping the results per VM.

You can easily add a 2nd property to group by.

That would be Day in your case if I understand your question correctly?

Your scrip is looking at the averages and it finds the maximum average value.

Is that what you mean by 'peak' CPU and memory?

The 95th percentile is just a calculation you perform on the data for 1 day.

There are many examples available, see for example A percentile function for PowerShell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jroc151
Contributor
Contributor
Jump to solution

Thank you for your prompt response and assistance!  Got what I needed by adding the 2nd property as you suggested.

Thanks again!

Reply
0 Kudos