Thor Logo dbatools

CPU

Get-DbaCpuRingBuffer

Patrick Flynn (@sqllensman)

Get-DbaCpuRingBuffer View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Retrieves historical CPU utilization data from SQL Server’s internal ring buffer for performance analysis Description This command queries sys.dm_os_ring_buffers to extract detailed CPU utilization history for performance troubleshooting and capacity planning. Based on Glen Berry’s diagnostic query, it provides minute-by-minute CPU usage breakdowns that help identify performance patterns and resource contention. The ring buffer stores CPU utilization data in one-minute increments for up to 256 minutes, tracking three key metrics: SQL Server process utilization, other processes utilization, and system idle time.

Read more

Get-DbaCpuUsage

Chrissy LeMaire (@cl), netnerds.net

Get-DbaCpuUsage View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Correlates SQL Server processes with Windows threads to identify which queries are consuming CPU resources Description When CPU usage is high on your SQL Server, it can be difficult to pinpoint which specific SQL queries or processes are responsible using standard SQL Server tools alone. This function bridges that gap by correlating SQL Server process IDs (SPIDs) with Windows kernel process IDs (KPIDs) through system DMVs and Windows performance counters.

Read more