SELECT cpu_count AS '# of Cores', hyperthread_ratio AS '# of Threads',
cpu_count / hyperthread_ratio AS 'Physical CPU Count',
physical_memory_in_bytes / 1048576 AS 'Physical memory (MB)'
FROM sys.dm_os_sys_info
Result:
# of Cores # of Threads Physical CPU Count Physical memory (MB)