dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer

Home Page:https://dbatools.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a dbatools command that helps you translate an offending thread in the OS to a spid?

NagromCurse opened this issue · comments

Summarize Command's Functionality

If you want to translate between an SQL Server thread (kpid) (for example, one that is swamping the CPU) and a spid, the only way that I know of is using Performance Monitor. This is a slow and manual process. Also, the situation you're investigating might be disappear while you're going through these manual steps.

It would be good if there was a command that could do this instantly.
Or is there already one?

Is there a command that is similiar or close to what you are looking for?

No

Technical Details

This article describes the manual steps:
https://www.mssqltips.com/sqlservertip/2454/how-to-find-out-how-much-cpu-a-sql-server-process-is-really-using/

Found it: Get-DbaCpuUsage