CPU core

Display logical and physical cores.

Last updated:

Warning: Review and test in a non-production environment before running.

Back to results

SELECT
  @@SERVERNAME AS server_name,
  cpu_count AS logical_CPU_cores,
  cpu_count/hyperthread_ratio AS physical_CPU_sockets
FROM sys.dm_os_sys_info