You can use Azure Monitor for this:
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/monitor-azure-resource
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
There is a Linux VM in Azure.
How to monitor its CPU and RAM usage?
For example I need to find the maximum CPU and RAM usage for a certain period of time (from 8AM till 6PM).
You can use Azure Monitor for this:
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/monitor-azure-resource
Thank you for reaching out to the Microsoft Q&A platform.
As suggested by Olaf, to monitor the CPU and RAM usage of a Linux VM in Azure, you can use Azure Monitor. Here are the steps to find the maximum CPU and RAM usage for a certain period of time:
Refer to this link : https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-performance
Alternatively, you can use the Azure Monitor REST API to collect the CPU and RAM usage data for the VM. You can use the following GET request to collect the CPU and RAM usage data: GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/microsoft.insights/metrics?api-version=2018-01-01&metricnames=Percentage CPU,Memory Usage×pan=2018-06-05T03:00:00Z/2018-06-07T03:00:00Z Replace the {subscriptionId}, {resourceGroupName}, and {vmName} placeholders with the appropriate values for your VM. The timespan parameter specifies the period of time you want to monitor.
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/metrics-vm-usage-rest
I hope this helps! Let me know if you have any other questions.
If I have answered your query, please click "Accept as answer" as a token of appreciation