Blog Post

CPU Count

,

I document the CPU Count for SQL Server inventory management.

Using a powershell script , iterate through all the SQL Servers and capture the CPU count with the following t-sql.

----Returns the logical cpu count on server 
SELECT cpu_count FROM  sys.dm_os_sys_info
----Ratio of the number of logical or physical cores that are exposed by one physical processor package
SELECT  hyperthread_ratio FROM  sys.dm_os_sys_info
----Physical CPU count 
SELECT cpu_count/hyperthread_ratio as physical_count  FROM sys.dm_os_sys_info

 Related Posts

Affinity Mask on SQL Server 2008 R2

SQL Server – SOS_SCHEDULER_YIELD and how to reduce it

Author: Jack Vamvas (http://www.sqlserver-dba.com)


Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating