Forum Discussion

Alex Kobin's avatar
Alex Kobin
Copper Contributor
Aug 16, 2018
Solved

Query How to find disk free space in % in LINUX VM's

Hi everyone I'm looking for a query that will show me a free disk space in % in Linux VM's. For now i got a query that suppose to show me what i need but the results is wrong for LINUX VM's. So i...
  • Noa Kuperberg's avatar
    Aug 20, 2018

    Hi,

    Indeed,"% Free Space" is a performance log sent from Windows. Linux is reporting "% Used space" instead, and unfortunately the object name is slightly different (with space), try this:

    Perf 
    | where ObjectName == "Logical Disk" and CounterName == "% Used Space" 
    | summarize arg_max(TimeGenerated, *) by Computer

    The 'arg_max' line is optional. I used it to return only the latest report per computer. Note this is the percent of used space, if you need free space you add this line:

    | extend free_space=100-CounterValue

    and the calculated value would appear as the right-most column on the results table.

     

    HTH,

    Noa

Resources