When you go to the performance tab of a datastore you can see the graph of allocated and used space over a time range.
How do you access these stats via powercli?
get-stattype -entity * doesn't seem to return any stat types for datastores
the point of this is i'm trying to script a report that shows the datastore usage percentage over the last 7 days
e.g, 80%, 81%, 82%, 82%, 82%, 83%, 83%
Have a look at my post called Datastore usage statistics
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
no takers?
PowercLi - a simple 'Get-Datastore' - will return all Datastores, the Capacity and the amount of free space.
Simply schedule this daily and pipe the outout to a file somewhere and you will have all the info you need.
Sample output
Name FreeSpaceMB CapacityMB
---- ----------- ----------
DATASTORE119 50642 477696
DATASTORE112T2 91838 1023488
7578_local 85814 137984
DATASTORE105 61535 477696
Good luck
yes, interesting workaround.
I could dump datastore objects using export-clixml to a file and read it in the next day.
It will be an interesting scripting challenge. But I guess there is no other option since that data is not available via get-view or get-stat
Have a look at my post called Datastore usage statistics
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
:smileygrin: now that's what I call answered! I need a triple points button when awarding that the correct answer lol
Thanks heaps LucD!