VMware Cloud Community
RafaelCamargo
Contributor
Contributor
Jump to solution

How Calculate the time of a VM is in poweroff state?

Hi,

I need to calculate the time of  of a VM is in poweroff state, someone already did that?

Thanks

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Not exactly what you are looking for, but it should give you an idea how it can be done.

See my Events – Part 5 : Powered off for more than 1 week ? post.

You should collect the " ... powered off" and "...powered on" events, group them by VM, sort on the date and then get the timespan between a powered off and a powered on.


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Not exactly what you are looking for, but it should give you an idea how it can be done.

See my Events – Part 5 : Powered off for more than 1 week ? post.

You should collect the " ... powered off" and "...powered on" events, group them by VM, sort on the date and then get the timespan between a powered off and a powered on.


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

0 Kudos
RafaelCamargo
Contributor
Contributor
Jump to solution

Really Thanks!

0 Kudos