How to find/query disk growth for Windows VM

%3CLINGO-SUB%20id%3D%22lingo-sub-1420446%22%20slang%3D%22en-US%22%3EHow%20to%20find%2Fquery%20disk%20growth%20for%20Windows%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1420446%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20to%20calculate%20Disk%20%22%25%20Growth%22%20for%20Windows%20%26amp%3B%20Linux%20VMs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20referring%20earlier%20articles%2FConversation%2C%20I%20am%20able%20to%20get%20details%2Fdata%20for%20Free_Space%20%26amp%3B%20Used_Space.%20Now%20I%20have%20to%20write%20a%20query%20for%20%22%25%20Growth%22%20and%20%22Growth%20%25%20ABS%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20any%20available%20counter%20or%20way%20to%20write%20Log%20query%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1420446%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELog%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1424955%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20find%2Fquery%20disk%20growth%20for%20Windows%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1424955%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F679950%22%20target%3D%22_blank%22%3E%40PrashantM2495%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20you%20looking%20for%20%25%20change%20per%20day%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EPerf%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofday(ago(7d))%0A%7C%20where%20Computer%20%3D%3D%20%22VM01%22%0A%7C%20where%20CounterName%20%3D%3D%20%22Free%20Megabytes%22%20and%20InstanceName%20%3D%3D%20%22_Total%22%20%0A%7C%20summarize%20max(CounterValue)%20by%20Computer%2C%20bin(TimeGenerated%2C%201d)%0A%7C%20order%20by%20Computer%20asc%2C%20TimeGenerated%20asc%0A%7C%20extend%20changeInMb%20%3D%20max_CounterValue%20%20-%20prev(max_CounterValue%2C%201)%0A%7C%20extend%20pctChange%20%3D%20(changeInMb%20*%20100)%20%2F%20prev(max_CounterValue%2C1)%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1432747%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20find%2Fquery%20disk%20growth%20for%20Windows%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1432747%22%20slang%3D%22en-US%22%3EThanks%20Clive.%20It%20works%20for%20me.%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi,

I have to calculate Disk "% Growth" for Windows & Linux VMs.

 

By referring earlier articles/Conversation, I am able to get details/data for Free_Space & Used_Space. Now I have to write a query for "% Growth" and "Growth % ABS".

 

Is any available counter or way to write Log query?  

2 Replies
Highlighted

@PrashantM2495 

 

Are you looking for % change per day?  

Perf
| where TimeGenerated > startofday(ago(7d))
| where Computer == "VM01"
| where CounterName == "Free Megabytes" and InstanceName == "_Total" 
| summarize max(CounterValue) by Computer, bin(TimeGenerated, 1d)
| order by Computer asc, TimeGenerated asc
| extend changeInMb = max_CounterValue  - prev(max_CounterValue, 1)
| extend pctChange = (changeInMb * 100) / prev(max_CounterValue,1)
Highlighted
Thanks Clive. It works for me.