Report on selected servers for a week on the memory usage

%3CLINGO-SUB%20id%3D%22lingo-sub-1350680%22%20slang%3D%22en-US%22%3EReport%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1350680%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20a%20help%20with%20a%20Kusto%26nbsp%3B%20query%20which%20I%20have%20almost%20completed%20but%20I%20am%20struggling%20in%20the%20last%20part.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKusto%20query%3C%2FP%3E%3CP%3EPerf%3CBR%20%2F%3E%7C%20where%20ObjectName%20%3D%3D%20%22Memory%22%20and%20CounterName%20%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%20and%20Computer%20%3D%3D%20%22VM-WVD-REL86-5.networkhg.org.uk%22%3CBR%20%2F%3E%7C%20extend%20Used_Percent_Memory%20%3D%20100-%20CounterValue%3CBR%20%2F%3E%7C%20summarize%20Used_Percent_Memory%20%3D%20max(CounterValue)%20by%20Computer%2C%20ObjectName%3CBR%20%2F%3E%7C%20where%20Used_Percent_Memory%20%26lt%3B%2090%20and%20Used_Percent_Memory%20%26gt%3B%2070%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20query%20shows%20me%20percent%20memory%20being%20used%20over%2070%25%20for%20specific%20server%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20would%20like%20to%20add%20a%20extra%20line%20in%20this%20query%2C%20where%20it%20will%20show%20me%20the%20memory%20percent%20for%205%20days%20for%20this%20relevant%20server%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20this%20but%20I%20am%20not%20sure%20where%20to%20exactly%20added%20within%20this%20query.%3C%2FP%3E%3CP%3Elet%20start_time%3Dstartofday(datetime(%222018-03-01%22))%3B%3CBR%20%2F%3Elet%20end_time%3Dnow()%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1350680%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1351060%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1351060%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F643248%22%20target%3D%22_blank%22%3E%40Arslan11%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3EPerf%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofday(ago(5d))%20%2F%2F%20from%20midnight%2C%20just%20use%20ago(5d)%20for%205days%20before%20now%0A%7C%20where%20ObjectName%20%3D%3D%20%22Memory%22%20and%20CounterName%20%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%20%0A%2F%2Fand%20Computer%20%3D%3D%20%22VM-WVD-REL86-5.networkhg.org.uk%22%0A%7C%20extend%20Used_Percent_Memory%20%3D%20100-%20CounterValue%0A%7C%20summarize%20Used_Percent_Memory%20%3D%20max(CounterValue)%20by%20Computer%2C%20ObjectName%0A%7C%20where%20Used_Percent_Memory%20%26lt%3B%2090%20and%20Used_Percent_Memory%20%26gt%3B%2070%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CTABLE%20cellspacing%3D%221%22%20cellpadding%3D%225%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTH%3EComputer%3C%2FTH%3E%0A%3CTH%3EObjectName%3C%2FTH%3E%0A%3CTH%3EUsed_Percent_Memory%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EComputer1%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E77.8518753051758%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EComputer2%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E83.6081695556641%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20could%20also%20use%20startofweek()%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3EPerf%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofweek(now())%0A%7C%20where%20ObjectName%20%3D%3D%20%22Memory%22%20and%20CounterName%20%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%20%0A%2F%2Fand%20Computer%20%3D%3D%20%22VM-WVD-REL86-5.networkhg.org.uk%22%0A%7C%20extend%20Used_Percent_Memory%20%3D%20100-%20CounterValue%0A%7C%20summarize%20Used_Percent_Memory%20%3D%20max(CounterValue)%2C%20min(TimeGenerated)%20by%20Computer%2C%20ObjectName%0A%7C%20where%20Used_Percent_Memory%20%26lt%3B%2090%20and%20Used_Percent_Memory%20%26gt%3B%2070%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CTABLE%20cellspacing%3D%221%22%20cellpadding%3D%225%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTH%3EComputer%3C%2FTH%3E%0A%3CTH%3EObjectName%3C%2FTH%3E%0A%3CTH%3EUsed_Percent_Memory%3C%2FTH%3E%0A%3CTH%3Emin_TimeGenerated%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EComputer1%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E77.8518753051758%3C%2FTD%3E%0A%3CTD%3E2020-04-27T09%3A00%3A52.997Z%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EComputer2%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E83.6081695556641%3C%2FTD%3E%0A%3CTD%3E2020-04-26T00%3A00%3A03.257Z%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20compare%20weeks%2C%20example%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3EPerf%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofday(ago(14d))%0A%7C%20where%20Computer%20startswith%20%22retail%22%20%0A%7C%20where%20ObjectName%20%3D%3D%20%22Memory%22%20and%20CounterName%20%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%20%0A%7C%20extend%20Used_Percent_Memory%20%3D%20100-%20CounterValue%0A%7C%20summarize%20This_week_Used_Percent_Memory%20%3D%20max(CounterValue)%20by%20bin(TimeGenerated%2C%201d)%2C%20Computer%2C%20ObjectName%0A%7C%20order%20by%20TimeGenerated%20asc%0A%7C%20extend%20PrevWeek%3Dprev(This_week_Used_Percent_Memory%2C%207)%0A%7C%20where%20TimeGenerated%20%26gt%3B%20ago(7d)%0A%7C%20project%20TimeGenerated%2C%20This_week_Used_Percent_Memory%20%2C%20PrevWeek%0A%7C%20render%20timechart%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-04-30%20201621.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F188047iDABE05D7102B7BDE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-04-30%20201621.jpg%22%20alt%3D%22Annotation%202020-04-30%20201621.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorClive%20Watson_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorClive%20Watson_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1351419%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1351419%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%20Thanks%20%2C%20I%20tired%20your%20query%20but%20it%20didn't%20answer%20my%20question%2C%20I%20have%26nbsp%3B%20pasted%20the%20query.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20TimeGenerated%20%26gt%3B%20startofday(ago(%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3Ed))%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20ObjectName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22Memory%22%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20CounterName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22%25%20Committed%20Bytes%20In%20Use%22%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20Computer%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22VM-WVD-REL86-5.networkhg.org.uk%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Eextend%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%3D%20%3C%2FSPAN%3E%3CSPAN%3E100%3C%2FSPAN%3E%3CSPAN%3E-%20CounterValue%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%3D%20max(CounterValue)%2C%20min(TimeGenerated)%20%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%20Computer%2C%20ObjectName%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%26lt%3B%20%3C%2FSPAN%3E%3CSPAN%3E90%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%26gt%3B%20%3C%2FSPAN%3E%3CSPAN%3E70%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ewhat%20I%20really%20want%20%2C%20I%20want%20my%20%22%22VM-WVD-REL86-5.networkhg.org.uk%22%20server%20to%20show%20me%20the%20results%20of%20memory%20usage%26nbsp%3Bfor%205%20days.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3EI%20have%20attached%20the%20picture%20to%20this%20post%2C%20table%20is%20showing%20value%20for%201%20day%20but%20I%20want%20it%20to%20show%20value%20for%20the%205%20days.%20for%20instance%20%2C%20I%20want%20the%20query%20to%20show%20the%20memory%20usage%20for%20Monday%2C%20Tuesday%2C%20Wednesday%2C%20Thursday%20and%20Friday%20for%20the%20server%26nbsp%3B%3CSPAN%3E%22%22VM-WVD-REL86-5.networkhg.org.uk%22.%20I%20hope%20%2C%20you%20will%20work%20this%20out%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1352081%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1352081%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F643248%22%20target%3D%22_blank%22%3E%40Arslan11%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20see%20now%2C%20so%20change%20to%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3EPerf%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofday(ago(5d))%0A%7C%20where%20ObjectName%20%3D%3D%20%22Memory%22%20and%20CounterName%20%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%20%0A%7C%20where%20Computer%20startswith%20%22retail%22%0A%7C%20extend%20Used_Percent_Memory%20%3D%20100-%20CounterValue%0A%7C%20summarize%20Used_Percent_Memory%20%3D%20max(CounterValue)by%20bin(TimeGenerated%2C1d)%20%2C%20Computer%2C%20ObjectName%0A%7C%20where%20Used_Percent_Memory%20%26lt%3B%2090%20and%20Used_Percent_Memory%20%26gt%3B%2070%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20take%205%20days%20of%20data%2C%20then%20use%20a%20BIN%20in%20the%20summarise%20line%20to%20group%20the%20results%20per%20day%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20TimeGenerated%20%26gt%3B%20startofday%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eago%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSTRONG%3E5d%3C%2FSTRONG%3E%3CSPAN%3E))%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CEM%3Eand%3C%2FEM%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%3D%20max%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ECounterValue%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSTRONG%3E%20bin%3C%2FSTRONG%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ETimeGenerated%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSTRONG%3E1d%3C%2FSTRONG%3E%3CSPAN%3E)%3C%2FSPAN%3E%20%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20Computer%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20ObjectName%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CTABLE%20cellspacing%3D%221%22%20cellpadding%3D%225%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTH%3ETimeGenerated%3C%2FTH%3E%0A%3CTH%3EComputer%3C%2FTH%3E%0A%3CTH%3EObjectName%3C%2FTH%3E%0A%3CTH%3EUsed_Percent_Memory%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2020-05-01T00%3A00%3A00Z%3C%2FTD%3E%0A%3CTD%3Eretail%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E83.4487609863281%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2020-04-28T00%3A00%3A00Z%3C%2FTD%3E%0A%3CTD%3Eretail%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E83.6081695556641%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2020-04-30T00%3A00%3A00Z%3C%2FTD%3E%0A%3CTD%3Eretail%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E83.2831649780273%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2020-04-26T00%3A00%3A00Z%3C%2FTD%3E%0A%3CTD%3Eretail%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E83.5125961303711%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2020-04-29T00%3A00%3A00Z%3C%2FTD%3E%0A%3CTD%3Eretail%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E82.2031326293945%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2020-04-27T00%3A00%3A00Z%3C%2FTD%3E%0A%3CTD%3Eretail%3C%2FTD%3E%0A%3CTD%3EMemory%3C%2FTD%3E%0A%3CTD%3E81.8324279785156%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ee.g.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-05-01%20084653.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F188144iB11AE26FC9934F30%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-05-01%20084653.jpg%22%20alt%3D%22Annotation%202020-05-01%20084653.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorClive%20Watson_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1352827%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1352827%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3EThanks%2C%20you%20are%20a%20star%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%2C%20if%20I%20have%20any%20more%20Kusto%20querys%2C%20I%20will%20let%20you%20know%2C%20thanks%20again%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1358540%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1358540%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Clive%26nbsp%3B%20thanks%20for%20the%20query%20%2C%20but%20what%20I%20observe%20is%20the%20difference%20in%20the%20actual%20memory%20in%20the%20Virtual%20Machine%20when%20compared%20with%20query%20output.%3C%2FP%3E%3CP%3EI%20used%20this%20query%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EPerf%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20TimeGenerated%20%26gt%3B%20startofday(ago(%3C%2FSPAN%3E%3CSPAN%3E5%3C%2FSPAN%3E%3CSPAN%3Ed))%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20ObjectName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22Memory%22%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20CounterName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22%25%20Committed%20Bytes%20In%20Use%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Eextend%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%3D%20%3C%2FSPAN%3E%3CSPAN%3E100%3C%2FSPAN%3E%3CSPAN%3E-%20CounterValue%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%3D%20max(CounterValue)%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%20bin(TimeGenerated%2C%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3Ed)%20%2C%20Computer%2C%20ObjectName%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%26lt%3B%20%3C%2FSPAN%3E%3CSPAN%3E90%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20Used_Percent_Memory%20%26gt%3B%20%3C%2FSPAN%3E%3CSPAN%3E70%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20when%20a%20login%20to%20VM%20if%20I%20check%20%2C%20the%20latest%20it%20show%20memory%20less%20than%2080%20for%20live0%20and%20live1%26nbsp%3B%20and%20for%20DB%20it%20is%2087%20%25%20memory%20utilized%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Capture1.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F188799iFE5D832527FEE22F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Capture1.PNG%22%20alt%3D%22Capture1.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20refer%20the%20above%20graph%20%2C%20not%20sure%20why%20this%20difference%20is%20coming%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1358583%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1358583%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F647249%22%20target%3D%22_blank%22%3E%40SamsonJohn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20section%20of%20the%20query%20we%20look%20at%20memory%20between%20%3CSTRONG%3E70%20%26amp%3B%2090%3C%2FSTRONG%3E%20%25%2C%20we%20take%20the%20max%20value%20seen%20on%20a%20given%20day%20(the%20BIN%20takes%20all%20the%20daily%20values%20and%20gives%20us%20one%20figure)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BUsed_Percent_Memory%20%3D%20max(CounterValue)%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bbin(TimeGenerated%2C%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3Ed)%20%2C%20Computer%2C%20ObjectName%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BUsed_Percent_Memory%20%26lt%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E90%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BUsed_Percent_Memory%20%26gt%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E70%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3ESo%20when%20a%20login%20to%20VM%20if%20I%20check%20%2C%20the%20latest%20it%20show%20memory%20less%20than%2080%20for%20live0%20and%20live1%26nbsp%3B%20and%20for%20DB%20it%20is%2087%20%25%20memory%20utilized%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20if%20memory%20is%20above%2070%25%20you%20will%20see%20it%2C%20based%20on%20the%20%3CSTRONG%3Emax%3C%2FSTRONG%3E%20value%20for%20that%20day%2C%20which%20isn't%20necessarily%20the%20current%20value.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20may%20need%20to%20look%20at%20the%20past%20hour%20broken%20into%201m%20BINS%20for%20this%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3EPerf%0A%7C%20where%20TimeGenerated%20%26gt%3B%20ago(1h)%0A%7C%20where%20ObjectName%20%3D%3D%20%22Memory%22%20and%20CounterName%20%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%0A%7C%20extend%20Used_Percent_Memory%20%3D%20100-%20CounterValue%0A%7C%20summarize%20Used_Percent_Memory%20%3D%20max(CounterValue)%20by%20bin(TimeGenerated%2C1m)%20%2C%20Computer%2C%20ObjectName%0A%2F%2F%7C%20where%20Used_Percent_Memory%20%26lt%3B%2090%20and%20Used_Percent_Memory%20%26gt%3B%2070%0A%7C%20render%20timechart%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1359359%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1359359%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Clive%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20still%20find%20the%20difference%20in%20percentage%20of%20the%20memory%20utilized%20in%20VM%20.%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20if%20the%20query%20can%20be%20modified%20to%20get%20the%20average%20utilization%20of%20memory%20so%20as%20to%20get%20accurate%20utilization%20.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1361826%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1361826%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Clive%20%2C%20I%20have%20used%20the%20query%20to%20fetch%20details%20but%20it%20is%20giving%20me%20differences%20in%20the%20values%20for%2010%25%26nbsp%3B%20when%20compared%20to%20actual%20memory%20utilization%20in%20Server%20and%20causing%20the%20invalid%20alert%20since%20I%20have%20set%20it%20for%20memory%20utilization%20%26gt%3B90%20%25%20based%20on%20this%20query.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAm%20check%20as%20this%20as%20well%20%2C%20any%20suggestion%20or%20helps%20in%20regards%20for%20this%20appreciated%20.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1363674%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1363674%22%20slang%3D%22en-US%22%3ESwap%20this%20line%20%3CBR%20%2F%3E%3CBR%20%2F%3Emax(CounterValue)%3CBR%20%2F%3E%3CBR%20%2F%3Eto%20say%20%3CBR%20%2F%3E%3CBR%20%2F%3Eavg(CounterValue)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1365718%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1365718%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20this%20replace%20max%20with%20avg%20as%20well%20but%20there%20is%20no%20differences%20here%20the%20result%20is%20same.%3C%2FP%3E%3CP%3Estill%20not%20returning%20the%20correct%20data%26nbsp%3B%20for%20memory%3C%2FP%3E%3CP%3EWas%20also%20going%20through%20this%20post%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsites.google.com%2Fa%2Fthetnaing.com%2Ftherunningone%2Fhow-to-calculate-systems-memory-utilization%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsites.google.com%2Fa%2Fthetnaing.com%2Ftherunningone%2Fhow-to-calculate-systems-memory-utilization%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWas%20wondering%20do%20we%20need%20to%20apply%20the%20correct%20formula%20to%20evaluate%20the%20memory%20%2Cplease%20suggest%20in%20regards%20to%20the%20same.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1368765%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1368765%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F647249%22%20target%3D%22_blank%22%3E%40SamsonJohn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETwo%20questions%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20what%20is%20perf%20collection%20interval%20for%20the%20memory%20counter%3F%26nbsp%3B%20My%20thoughts%20are%20if%20you%20are%20collecting%20to%20a%20different%20interval%20to%20Perfmon%20you%20may%20see%20variation%20based%20in%20aggregation.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-05-07%20090616.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189702iF8E033873039D834%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-05-07%20090616.jpg%22%20alt%3D%22Annotation%202020-05-07%20090616.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20Are%20you%20using%20Perfmon%20(the%20counters%20and%20data%20is%20the%20same%2C%20apart%20from%20the%20collection%20interval)%3B%20Task%20Manager%20can%20show%20different%20results.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fms.portal.azure.com%23%4072f988bf-86f1-41af-91ab-2d7cd011db47%2Fblade%2FMicrosoft_Azure_Monitoring_Logs%2FDemoLogsBlade%2FresourceId%2F%252FDemo%2Fsource%2FLogsBlade.AnalyticsShareLinkToQuery%2Fq%2FH4sIAAAAAAAAA22QQUvDQBCF74X%25252BhyEgJBAPPfUUDxYRD2qh1muZJM9mpbMpk4k14o93t0pjoXNa5r3vzc4soW%25252FTyTcdGijoxQnu4aFsqOmGeNumsyYbDYtW9r1BqSgoURi73d16NU9Gx3P5jsqeWHD0PEJaHRJiXwe494E9aVcxTpzFWbeDoaMHT%25252BsOx7SuF2F1XyDhz9CsN0toBW%25252Bb30gqopD%25252BZb7yrkeWTyf0r%25252FhjexkMwjkYuXKg0vn07AT5TDLKT1vHf%25252B21jQte84GH8RxRUfg6PC0EVA2r0Q9eUKVTXAEAAA%25253D%25253D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGo%20to%20Log%20Analytics%20and%20run%20query%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3EPerf%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3ETimeGenerated%20%26gt%3B%20ago(%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3Eh)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20Computer%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22retailEUS7%22%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20ObjectName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22Memory%22%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20CounterName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22%25%20Committed%20Bytes%20In%20Use%22%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%20maxUsed_Percent_Memory%20%3D%20max(CounterValue)%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%20avgUsed_Percent_Memory%20%3D%20avg(CounterValue)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%20bin(TimeGenerated%2C%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3Em)%20%2C%20Computer%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Eproject-away%3C%2FSPAN%3E%3CSPAN%3E%20Computer%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Erender%3C%2FSPAN%3E%3CSPAN%3E%20timechart%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20it%20unlikely%20Avg%20is%20the%20same%20as%20Max.%20See%20this%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-05-07%20091802.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189704i2635EF12627E0E22%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-05-07%20091802.jpg%22%20alt%3D%22Annotation%202020-05-07%20091802.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorClive%20Watson_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1372698%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1372698%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%3C%2FP%3E%3CP%3ESure%20to%20Answer%20the%20question%20please%20find%20below%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Perfmon%20Set%20is%20as%20below%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SamsonJohn_0-1588916327951.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189980i0FFF3C8B3E4F7734%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22SamsonJohn_0-1588916327951.png%22%20alt%3D%22SamsonJohn_0-1588916327951.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2)%20After%20executing%20the%20query%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SamsonJohn_1-1588917458788.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189988i113699957DD9DACC%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22SamsonJohn_1-1588917458788.png%22%20alt%3D%22SamsonJohn_1-1588917458788.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESo%20both%20are%20coming%20same%26nbsp%3B%20avg%20and%20max%2C%20there%20is%20no%20change%20.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20if%20you%20have%20any%20updates%20in%20regards%20to%20the%20same.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1378118%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378118%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F647249%22%20target%3D%22_blank%22%3E%40SamsonJohn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOk%2C%20so%20you%20avg%20and%20max%20are%20the%20same%20(some%20workloads%20can%20be).%26nbsp%3B%20Have%20you%20setup%20Perfmon%20to%20match%20your%20settings%2C%20something%20like%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-05-10%20164613.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190450i81E92BAE2F0AEFE5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-05-10%20164613.jpg%22%20alt%3D%22Annotation%202020-05-10%20164613.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAre%20you%20still%20seeing%20a%20~10%25%20difference%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1384820%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1384820%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20even%20after%20doing%20those%20changes%20I%20am%20seeing%20the%20difference%20.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SamsonJohn_1-1589342259525.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F191202i506071ACAF0B904D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22SamsonJohn_1-1589342259525.png%22%20alt%3D%22SamsonJohn_1-1589342259525.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAnd%20the%20Actual%20Memory%20Utilization%20is%20as%20below%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SamsonJohn_2-1589342431463.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F191203iEF02641C22D138A4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22SamsonJohn_2-1589342431463.png%22%20alt%3D%22SamsonJohn_2-1589342431463.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESo%20In%20actual%20the%20query%20is%20returning%20the%20memory%20committed%20percent%20the%20actual%20utilized%20memory%20(in%20the%20above%20image%20is%2077%20percent)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20feel%20we%20need%20to%20change%20the%20query%20for%20the%20actual%20percent.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1385401%22%20slang%3D%22en-US%22%3ERe%3A%20Report%20on%20selected%20servers%20for%20a%20week%20on%20the%20memory%20usage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1385401%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F647249%22%20target%3D%22_blank%22%3E%40SamsonJohn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELog%20Analytics%20stores%20the%20same%20data%20as%20Perfmon%2C%20do%20the%20Perfmon%20charts%20match%20your%20Log%20Analytics%20query%3F%26nbsp%3B%20That's%20the%20apples%20to%20apples%20comparison.%26nbsp%3B%20Now%20I'm%20in%20no%20way%20saying%20this%20is%20the%20issue%2C%20but%20Task%20Manger%20could%20be%20showing%20a%20different%20view%2C%20one%20example%20%3CA%20href%3D%22https%3A%2F%2Fsqlinthewild.co.za%2Findex.php%2F2016%2F01%2F19%2Fstop-using-task-manager-to-check-sqls-memory-usage%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsqlinthewild.co.za%2Findex.php%2F2016%2F01%2F19%2Fstop-using-task-manager-to-check-sqls-memory-usage%2F%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20can%20only%20help%20you%20compare%20Perfmon%20with%20Log%20Analytics%20-%20are%20these%20different%20for%20the%20same%20time%20period%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I would like a help with a Kusto  query which I have almost completed but I am struggling in the last part.

 

Kusto query

Perf
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" and Computer == "VM-WVD-REL86-5.networkhg.org.uk"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue) by Computer, ObjectName
| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70

 

This query shows me percent memory being used over 70% for specific server

 

But I would like to add a extra line in this query, where it will show me the memory percent for 5 days for this relevant server

 

I found this but I am not sure where to exactly added within this query.

let start_time=startofday(datetime("2018-03-01"));
let end_time=now();

15 Replies

@Arslan11 

 

Perf
| where TimeGenerated > startofday(ago(5d)) // from midnight, just use ago(5d) for 5days before now
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" 
//and Computer == "VM-WVD-REL86-5.networkhg.org.uk"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue) by Computer, ObjectName
| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70



Computer ObjectName Used_Percent_Memory
Computer1 Memory 77.8518753051758
Computer2 Memory 83.6081695556641

 

 

You could also use startofweek()


Perf
| where TimeGenerated > startofweek(now())
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" 
//and Computer == "VM-WVD-REL86-5.networkhg.org.uk"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue), min(TimeGenerated) by Computer, ObjectName
| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70

 

Computer ObjectName Used_Percent_Memory min_TimeGenerated
Computer1 Memory 77.8518753051758 2020-04-27T09:00:52.997Z
Computer2 Memory 83.6081695556641 2020-04-26T00:00:03.257Z

 

 

You can also compare weeks, example

Perf
| where TimeGenerated > startofday(ago(14d))
| where Computer startswith "retail" 
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" 
| extend Used_Percent_Memory = 100- CounterValue
| summarize This_week_Used_Percent_Memory = max(CounterValue) by bin(TimeGenerated, 1d), Computer, ObjectName
| order by TimeGenerated asc
| extend PrevWeek=prev(This_week_Used_Percent_Memory, 7)
| where TimeGenerated > ago(7d)
| project TimeGenerated, This_week_Used_Percent_Memory , PrevWeek
| render timechart 

 

Annotation 2020-04-30 201621.jpg

 

 

 

 

@Clive Watson  Thanks , I tired your query but it didn't answer my question, I have  pasted the query.

 

| where TimeGenerated > startofday(ago(1d))
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" and Computer == "VM-WVD-REL86-5.networkhg.org.uk"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue), min(TimeGenerated) by Computer, ObjectName
| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70
 
 
what I really want , I want my ""VM-WVD-REL86-5.networkhg.org.uk" server to show me the results of memory usage for 5 days.
 
 

I have attached the picture to this post, table is showing value for 1 day but I want it to show value for the 5 days. for instance , I want the query to show the memory usage for Monday, Tuesday, Wednesday, Thursday and Friday for the server ""VM-WVD-REL86-5.networkhg.org.uk". I hope , you will work this out

 

@Arslan11 

 

I see now, so change to this:

 

Perf
| where TimeGenerated > startofday(ago(5d))
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" 
| where Computer startswith "retail"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue)by bin(TimeGenerated,1d) , Computer, ObjectName
| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70

 

We take 5 days of data, then use a BIN in the summarise line to group the results per day

 
| where TimeGenerated > startofday(ago(5d))
 
and

 

| summarize Used_Percent_Memory = max(CounterValue)by bin(TimeGenerated,1d) , Computer, ObjectName

 

 

TimeGenerated Computer ObjectName Used_Percent_Memory
2020-05-01T00:00:00Z retail Memory 83.4487609863281
2020-04-28T00:00:00Z retail Memory 83.6081695556641
2020-04-30T00:00:00Z retail Memory 83.2831649780273
2020-04-26T00:00:00Z retail Memory 83.5125961303711
2020-04-29T00:00:00Z retail Memory 82.2031326293945
2020-04-27T00:00:00Z retail Memory 81.8324279785156

 

e.g.

 

Annotation 2020-05-01 084653.jpg

 

 

@Clive WatsonThanks, you are a star:smile:, if I have any more Kusto querys, I will let you know, thanks again

@Clive Watson 

 

Hello Clive  thanks for the query , but what I observe is the difference in the actual memory in the Virtual Machine when compared with query output.

I used this query

Perf
| where TimeGenerated > startofday(ago(5d))
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue)by bin(TimeGenerated,1d) , Computer, ObjectName
| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70

 

So when a login to VM if I check , the latest it show memory less than 80 for live0 and live1  and for DB it is 87 % memory utilized

Capture1.PNG

 

Please refer the above graph , not sure why this difference is coming

 
 

 

 

 

@SamsonJohn 

 

In this section of the query we look at memory between 70 & 90 %, we take the max value seen on a given day (the BIN takes all the daily values and gives us one figure)

 

summarize Used_Percent_Memory = max(CounterValue)by bin(TimeGenerated,1d) , Computer, ObjectName
where Used_Percent_Memory < 90 and Used_Percent_Memory > 70

 

So when a login to VM if I check , the latest it show memory less than 80 for live0 and live1  and for DB it is 87 % memory utilized

 

So if memory is above 70% you will see it, based on the max value for that day, which isn't necessarily the current value.

 

You may need to look at the past hour broken into 1m BINS for this?

 

Perf
| where TimeGenerated > ago(1h)
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use"
| extend Used_Percent_Memory = 100- CounterValue
| summarize Used_Percent_Memory = max(CounterValue) by bin(TimeGenerated,1m) , Computer, ObjectName
//| where Used_Percent_Memory < 90 and Used_Percent_Memory > 70
| render timechart 

 

@Clive Watson 

 

Hi Clive,

 

I can still find the difference in percentage of the memory utilized in VM . 

Please let me know if the query can be modified to get the average utilization of memory so as to get accurate utilization .

 

@Clive Watson 

Hi Clive , I have used the query to fetch details but it is giving me differences in the values for 10%  when compared to actual memory utilization in Server and causing the invalid alert since I have set it for memory utilization >90 % based on this query.

 

Am check as this as well , any suggestion or helps in regards for this appreciated . 

Swap this line

max(CounterValue)

to say

avg(CounterValue)

@Clive Watson 

 

I have tried this replace max with avg as well but there is no differences here the result is same.

still not returning the correct data  for memory

Was also going through this post https://sites.google.com/a/thetnaing.com/therunningone/how-to-calculate-systems-memory-utilization 

Was wondering do we need to apply the correct formula to evaluate the memory ,please suggest in regards to the same.

 

@SamsonJohn 

 

Two questions,

 

1. what is perf collection interval for the memory counter?  My thoughts are if you are collecting to a different interval to Perfmon you may see variation based in aggregation.

Annotation 2020-05-07 090616.jpg

2. Are you using Perfmon (the counters and data is the same, apart from the collection interval); Task Manager can show different results.

 

 

Go to Log Analytics and run query

Perf
| where TimeGenerated > ago(1h)
| where Computer == "retailEUS7"
| where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use"
| summarize maxUsed_Percent_Memory = max(CounterValue),
avgUsed_Percent_Memory = avg(CounterValue)
by bin(TimeGenerated,1m) , Computer
| project-away Computer
| render timechart

 

I think it unlikely Avg is the same as Max. See this example:

 

Annotation 2020-05-07 091802.jpg

 

 

@Clive Watson

Sure to Answer the question please find below 

1) Perfmon Set is as below 

SamsonJohn_0-1588916327951.png

 

2) After executing the query

SamsonJohn_1-1588917458788.png

So both are coming same  avg and max, there is no change .

 

Please let me know if you have any updates in regards to the same.

 

@SamsonJohn 

 

Ok, so you avg and max are the same (some workloads can be).  Have you setup Perfmon to match your settings, something like?

Annotation 2020-05-10 164613.jpg

Are you still seeing a ~10% difference?

 

@Clive Watson 

Yes even after doing those changes I am seeing the difference .

 

SamsonJohn_1-1589342259525.png

And the Actual Memory Utilization is as below

SamsonJohn_2-1589342431463.png

So In actual the query is returning the memory committed percent the actual utilized memory (in the above image is 77 percent)

 

I feel we need to change the query for the actual percent.

 

 

 

 

@SamsonJohn 

 

Log Analytics stores the same data as Perfmon, do the Perfmon charts match your Log Analytics query?  That's the apples to apples comparison.  Now I'm in no way saying this is the issue, but Task Manger could be showing a different view, one example https://sqlinthewild.co.za/index.php/2016/01/19/stop-using-task-manager-to-check-sqls-memory-usage/

I can only help you compare Perfmon with Log Analytics - are these different for the same time period?