Highlighted
Contributor
Contributor

Historical hard disk stats

Jump to solution

I am trying to retrieve hard disk size or total hard disk storage (for a vm with more than 1 hard disk).

My aim is to determine if the total hard-disk storage for a vm has increased/decreased.

The CapacityKB return from Get-HardDisk command is what I'm looking for but I need to

get this information over a period of time.

The following code gets me a return for current figures:

$disksize = (($vm | get-harddisk | measure-object -property CapacityKB -sum  | Select @{N="sum";E={$_.SUM}}))

.

Are there any metrics that I can use or is there any way for me to calculate this based on existing metrics?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
User Moderator
User Moderator

Have a look at my Datastore usage statistics post.

With the disk.used.latest metric you can group on the VMid instance.

That should give you the hsitorical usage for a specific VM on a specific datastore.

Once you have collected these for all the datastores, it's a matter of adding the individual numbers per datastore for a specific VM


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

View solution in original post

0 Kudos
1 Reply
Highlighted
User Moderator
User Moderator

Have a look at my Datastore usage statistics post.

With the disk.used.latest metric you can group on the VMid instance.

That should give you the hsitorical usage for a specific VM on a specific datastore.

Once you have collected these for all the datastores, it's a matter of adding the individual numbers per datastore for a specific VM


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

View solution in original post

0 Kudos