In this post the focus is on identifying logical and physical cpu count for database servers with SQL Server 2005 and higher versions. The script uses the DMV sys.dm_os_sys_info which is used to retrieve OS related information in SQL Server. This script was provided by SQL Server MVP Glenn Berry.
SELECT cpu_count AS [Logical CPU Count], hyperthread_ratio AS [Hyperthread Ratio], cpu_count/hyperthread_ratio AS [Physical CPU Count], physical_memory_in_bytes/1048576 AS [Physical Memory (MB)], sqlserver_start_time FROM sys.dm_os_sys_info OPTION (RECOMPILE);
Below is the result set:
Hope this helps.