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
| Perf | where Computer == "MyComputer" | All performance data from a particular computer |
60
-
| Perf | where CounterName == "Current Disk Queue Length" | All performance data for a particular counter |
61
-
62
-
### Option 1 - Table
63
-
64
-
<br>
65
-
<details>
66
-
<summary>Expand for more queries</summary>
67
-
68
-
| Query | Description |
69
-
|:------|:------------|
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 |
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 |
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 |
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**
56
+
#### All performance data from a particular computer
111
57
112
58
```query
113
59
Perf
114
-
| where CounterName == "Disk Transfers/sec"
115
-
| summarize AggregatedValue = percentile(CounterValue, 95) by Computer
60
+
| where Computer == "MyComputer"
116
61
```
117
62
118
-
**Hourly average of CPU usage across all computers**
63
+
#### Average CPU utilization across all computers
119
64
120
65
```query
121
66
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
67
+
| where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total"
68
+
| summarize AVGCPU = avg(CounterValue) by Computer
132
69
```
133
70
134
-
**Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer**
71
+
#### Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer
135
72
136
73
```query
137
74
Perf
138
75
| where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer"
0 commit comments