Reports: VMs with C Drive 95 Full.sql

File uploaded by robert.coppersmith on Jul 31, 2017
Version 1Show Document
  • View in full screen mode

Although the Turbonomic platform is built to provide you with partition sizing decisions as the risk for filling up increases, some users may still prefer to have the ability to scope to partition/VM drive sizing decisions specifically.


The below SQL query will return all the VMs that have C drives over 95% utilized.


One can adjust this query to return info based on a different level of utilization, or for other/all drives.


If you want to adjust the level of utilization, find the line that says and v.avg_value > .95 and just change the .95 with your desired level of utilization (.8 = 80%) 


If you want to adjust the drive we are looking at, find the line that says and v.Commodity_key like '%C:%' and switch out the C: with the desired drive type that you want to scope to i.e. D: make sure to keep the '%  and %' on both sides of the drive type.


If you want to see all drives that are utilized above you're specified utilization level just delete the line that says and v.Commodity_key like '%C:%'.


Feel free to list any questions in the comments section.


, e.display_name as VMName
, substring_index((replace(v.Commodity_key,'_C','$C')),'$',-1) as FileDrive
, round(v.avg_value*100,2) as UtilizationValue
from vm_stats_by_hour v
join entities e on v.uuid = e.uuid
where v.property_type = 'VStorage'
and v.property_subtype = 'utilization'
and v.Commodity_key like '%C:%'
and v.avg_value > .95
order by 1 desc