成都创新互联网站制作重庆分公司

AzureMonitor监控windows系统CPU使用率

如果我们之前没有启用性能计数器数据,则可以在Log Analytics Workspace中单击“ 高级设置”,再单击“ 数据”,现在单击“ Windows性能计数器”,最后单击“ 添加选定的性能计数器”:

10年积累的成都网站建设、成都做网站经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计后付款的网站建设流程,更有青河免费网站建设让你可以放心的选择与我们合作。

Azure Monitor监控windows系统CPU使用率

查询收集到的数据
我们可以使用如下查询语句从我们收集到的数据中查询出系统的CPU使用率:

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
| render timechart

Azure Monitor监控windows系统CPU使用率

也可以使用如下语句来查看CPU使用率大于某个值的机器:

let setpctValue = 3;
Perf
| 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() step 10m by Computer
| render timechart

Azure Monitor监控windows系统CPU使用率

将性能图表固定到仪表板
若想将我们所查询出来的图表固定到Azure Dashboard,可以点击查询窗口右上方的“固定”按钮,然后选择我们要将图标展示在那个Dashboard。
Azure Monitor监控windows系统CPU使用率


当前文章:AzureMonitor监控windows系统CPU使用率
网站网址:http://cxhlcq.com/article/gddpso.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部