While working with the cloud providers I have seen sometimes Memory metrics not available in the monitoring dashboard. I always wanted to know & find the easiest way to get real-time data metrics of Linux VM.

After looking around & checking on the internet, I come across two possible ways to get the memory metrics.

Using Google Cloud Monitoring

Formally known as Stackdriver, you can install a monitoring agent on the VM which starts pushing memory and disk metrics.

Connect to your Google Cloud VM with your favorite SSH client Run the following command

Once an agent is up & running metrics will be available in the monitoring tab of VM.

Using Netdata

If you need more than monitoring metrics, you can use lightweight software monitoring software such as Netdata. Netdata is an open-source real-time monitoring tool that collects the metrics from the system & application. It is agent-based which means you need to install it on your server. It supports all major UNIX distro such as Ubuntu, CentOS, Debian, and container platforms like Docker, Kubernetes.

To install Netdata on VMs we can use this one-liner command.

Once the process gets complete we can check the service status using

Once service is active & running we can check the Netdata dashboard which listen on port 19999

I hope this gives you a quick idea about monitoring the memory of Google Cloud VM.

How to Monitor Google Cloud VM Memory Usage  - 27How to Monitor Google Cloud VM Memory Usage  - 43How to Monitor Google Cloud VM Memory Usage  - 47How to Monitor Google Cloud VM Memory Usage  - 74How to Monitor Google Cloud VM Memory Usage  - 97How to Monitor Google Cloud VM Memory Usage  - 73How to Monitor Google Cloud VM Memory Usage  - 93How to Monitor Google Cloud VM Memory Usage  - 14How to Monitor Google Cloud VM Memory Usage  - 2How to Monitor Google Cloud VM Memory Usage  - 62How to Monitor Google Cloud VM Memory Usage  - 83How to Monitor Google Cloud VM Memory Usage  - 67How to Monitor Google Cloud VM Memory Usage  - 63How to Monitor Google Cloud VM Memory Usage  - 37How to Monitor Google Cloud VM Memory Usage  - 55How to Monitor Google Cloud VM Memory Usage  - 7How to Monitor Google Cloud VM Memory Usage  - 97How to Monitor Google Cloud VM Memory Usage  - 58How to Monitor Google Cloud VM Memory Usage  - 77How to Monitor Google Cloud VM Memory Usage  - 24How to Monitor Google Cloud VM Memory Usage  - 30How to Monitor Google Cloud VM Memory Usage  - 52How to Monitor Google Cloud VM Memory Usage  - 69How to Monitor Google Cloud VM Memory Usage  - 47How to Monitor Google Cloud VM Memory Usage  - 4How to Monitor Google Cloud VM Memory Usage  - 10How to Monitor Google Cloud VM Memory Usage  - 27