You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/agents/data-collection-performance.md
+80-8Lines changed: 80 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,24 +59,96 @@ The following table provides different examples of log queries that retrieve per
59
59
| Perf | where Computer == "MyComputer" | All performance data from a particular computer |
60
60
| Perf | where CounterName == "Current Disk Queue Length" | All performance data for a particular counter |
61
61
62
+
### Option 1 - Table
63
+
62
64
<br>
63
65
<details>
64
-
<summary>Expand for more sample queries</summary>
66
+
<summary>Expand for more queries</summary>
65
67
66
68
| Query | Description |
67
69
|:------|:------------|
68
-
| Perf | where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AVGCPU = avg(CounterValue) by Computer |Average CPU utilization across all computers |
69
-
| Perf | where CounterName == "% Processor Time" | summarize AggregatedValue = max(CounterValue) by Computer |Maximum CPU utilization across all computers |
70
-
| Perf | where ObjectName == "LogicalDisk" and CounterName == "Current Disk Queue Length" and Computer == "MyComputerName" | summarize AggregatedValue = avg(CounterValue) by InstanceName |Average current disk queue length across all the instances of a given computer |
71
-
| Perf | where CounterName == "Disk Transfers/sec" | summarize AggregatedValue = percentile(CounterValue, 95) by Computer |95th percentile of disk transfers/sec across all computers |
72
-
| Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer |Hourly average of CPU usage across all computers |
70
+
| Perf | where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AVGCPU = avg(CounterValue) by Computer |Average CPU utilization across all computers |
71
+
| Perf | where CounterName == "% Processor Time" | summarize AggregatedValue = max(CounterValue) by Computer |Maximum CPU utilization across all computers |
72
+
| Perf | where ObjectName == "LogicalDisk" and CounterName == "Current Disk Queue Length" and Computer == "MyComputerName" | summarize AggregatedValue = avg(CounterValue) by InstanceName |Average current disk queue length across all the instances of a given computer |
73
+
| Perf | where CounterName == "Disk Transfers/sec" | summarize AggregatedValue = percentile(CounterValue, 95) by Computer |95th percentile of disk transfers/sec across all computers |
74
+
| Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer |Hourly average of CPU usage across all computers |
73
75
| Perf | where Computer == "MyComputer" and CounterName startswith_cs "%" and InstanceName == "_Total" | summarize AggregatedValue = percentile(CounterValue, 70) by bin(TimeGenerated, 1h), CounterName | Hourly 70th percentile of every percent counter for a particular computer |
74
-
| Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer" | summarize ["min(CounterValue)"] = min(CounterValue), ["avg(CounterValue)"] = avg(CounterValue), ["percentile75(CounterValue)"] = percentile(CounterValue, 75), ["max(CounterValue)"] = max(CounterValue) by bin(TimeGenerated, 1h), Computer |Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer |
76
+
| Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer" | summarize ["min(CounterValue)"] = min(CounterValue), ["avg(CounterValue)"] = avg(CounterValue), ["percentile75(CounterValue)"] = percentile(CounterValue, 75), ["max(CounterValue)"] = max(CounterValue) by bin(TimeGenerated, 1h), Computer |Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer |
75
77
| Perf | where ObjectName == "MSSQL$INST2:Databases" and InstanceName == "master" | All performance data from the database performance object for the master database from the named SQL Server instance INST2 |
78
+
</details>
79
+
80
+
### Option 2 - Code blocks
81
+
82
+
<br>
83
+
<details>
84
+
<summary>Expand for more queries</summary>
85
+
86
+
**Average CPU utilization across all computers**
87
+
88
+
```query
89
+
Perf
90
+
| where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total"
91
+
| summarize AVGCPU = avg(CounterValue) by Computer
92
+
```
93
+
94
+
**Maximum CPU utilization across all computers**
95
+
96
+
```query
97
+
Perf
98
+
| where CounterName == "% Processor Time"
99
+
| summarize AggregatedValue = max(CounterValue) by Computer
100
+
```
101
+
102
+
**Average current disk queue length across all the instances of a given computer**
103
+
104
+
```query
105
+
Perf
106
+
| where ObjectName == "LogicalDisk" and CounterName == "Current Disk Queue Length" and Computer == "MyComputerName"
107
+
| summarize AggregatedValue = avg(CounterValue) by InstanceName
108
+
```
109
+
110
+
**95th percentile of disk transfers/sec across all computers**
111
+
112
+
```query
113
+
Perf
114
+
| where CounterName == "Disk Transfers/sec"
115
+
| summarize AggregatedValue = percentile(CounterValue, 95) by Computer
116
+
```
117
+
118
+
**Hourly average of CPU usage across all computers**
119
+
120
+
```query
121
+
Perf
122
+
| where CounterName == "% Processor Time" and InstanceName == "_Total"
123
+
| summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer
124
+
```
125
+
126
+
**Hourly 70th percentile of every percent counter for a particular computer**
127
+
128
+
```query
129
+
Perf
130
+
| where Computer == "MyComputer" and CounterName startswith_cs "%" and InstanceName == "_Total"
131
+
| summarize AggregatedValue = percentile(CounterValue, 70) by bin(TimeGenerated, 1h), CounterName
132
+
```
133
+
134
+
**Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer**
135
+
136
+
```query
137
+
Perf
138
+
| where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer"
0 commit comments