Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Azure Monitor monitors CPU utilization of windows system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

If we have not previously enabled performance counter data, we can click Advanced Settings in Log Analytics Workspace, click data, now click Windows performance counters, and finally click add selected performance counters:

Query the collected data

We can use the following query statement to query the CPU utilization of the system from the data we have collected:

Perf | where ObjectName = "Processor" and CounterName = "% Processor Time" and InstanceName = = "_ Total" and Computer in ((Heartbeat | distinct Computer)) | summarize PCT95CPUPercentTime = percentile (CounterValue, 95) by Computer | summarize max (PCT95CPUPercentTime) by Computer | join (Perf | where ObjectName = = "Processor" and CounterName = "% Processor Time" and InstanceName = "_ Total" and Computer in ((Heartbeat | distinct Computer)) on Computer | make-series PCT95CPUPercentTime = percentile (CounterValue, 95) on TimeGenerated from ago (5h) to now () step 10m by Computer | by Computer

You can also use the following statement to view machines whose CPU usage is greater than a certain value:

Let setpctValue = 3Perf | where ObjectName = = "Processor" and CounterName = = "% Processor Time" and InstanceName = = "_ Total" and Computer in ((Heartbeat | distinct Computer)) | summarize PCT95CPUPercentTime = percentile (CounterValue, 95) by Computer | where PCT95CPUPercentTime > setpctValue | summarize max (PCT95CPUPercentTime) by Computer | join (Perf | where ObjectName = = "Processor" and CounterName = "% Processor Time" and InstanceName = = "Total" and Computer in ((Heartbeat | distinct Computer)) on Computer | make-series PCT95CPUPercentTime = percentile (CounterValue, 95) on TimeGenerated from ago (5h) to now () to now 10m step |

Fix the performance chart to the dashboard

To pin the chart we have queried to Azure Dashboard, click the "fixed" button at the top right of the query window, and then select the Dashboard in which we want to display the icon.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report