SOLVED

Getting memory consumption per process in a VM

Copper Contributor

Hi! Is there a way to get memory consumption per process exported to log analytics workspace? Probably the easiest way would be to log on to the VM but sometimes this is not possible and instead of just seeing we are out of memory would be nice to see what is actually eating up the memory.

I believe Rahul pointed to me, that I would need to enable process level perf counters from my workspace, to collect this data but i'm not 100% sure on how :)

4 Replies
best response confirmed by Juval (Copper Contributor)
Solution

@Juval 

We don't collect process performance counters out of the box 

You can configure the agent to configure to collect process performance counters as Rahul said.  Here is the link - https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-sources-performance-counters#conf...

 

regards

-ketan

@Juval Hi to enable performance counters, events from event viewer etcs... you need to go to log analytics workspace that you are using, and enable what you need in advance settings. 

 

loadedlouie27_1-1593535416688.png

Aftear this you have to select what you need : 

 

loadedlouie27_2-1593535532229.png

 

Hope this helps, you can also use this  : 

 

https://docs.microsoft.com/pt-pt/azure/azure-monitor/platform/data-sources-performance-counters 

 

Hope it helps it took me a while to understand what was needed. 

:) 


Just a side note keep tracking of what you enable, because log analytics is payed by ingestion... 

You can take a look at your ingestion and cost, in the "usage and Cost" on the log analytics workspace. 

 

Hope it helps. 

Best Regards. 

 

 

 

@loadedlouie27 


Hi thanks for the pics and guidance! I appreciate all the help i can get so thank you! Yeah need to be careful i guess so in that sense it would be nice if i could just enable on a problematic VM and not all of the VMs.

@Juval You can actually... 

it took me a while to understand, but basically 

loadedlouie27_0-1593537266941.png

when you add this counter : 

Processor(*)\% Processor Time

 

Your collecting for all the VM's, but if you putt it like this: 

Processor(YOURVMNAME)\% Processor Time

 

It will only collect the VM you specified. 


Don't ask me multiple VM's how-to, because I don't know but I'm guessing one line for each VM. 

 

:) hope it helps.

Hit That Like :D loool  

1 best response

Accepted Solutions
best response confirmed by Juval (Copper Contributor)
Solution

@Juval 

We don't collect process performance counters out of the box 

You can configure the agent to configure to collect process performance counters as Rahul said.  Here is the link - https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-sources-performance-counters#conf...

 

regards

-ketan

View solution in original post